Browse Source

gateway添加openapi环境配置

master
jianjun 5 years ago
parent
commit
643c3f976b
  1. 5
      epmet-gateway/pom.xml
  2. 9
      epmet-gateway/src/main/resources/bootstrap.yml

5
epmet-gateway/pom.xml

@ -182,6 +182,9 @@
<!-- 29、统计服务 -->
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- <gateway.routes.data-statistical-server.uri>http://localhost:8108</gateway.routes.data-statistical-server.uri>-->
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
<!-- <gateway.routes.epmet-openapi-scan.uri>http://localhost:8107</gateway.routes.epmet-openapi-scan.uri>-->
</properties>
</profile>
<profile>
@ -262,6 +265,8 @@
<gateway.routes.data-report-server.uri>lb://data-report-server</gateway.routes.data-report-server.uri>
<!-- 29、数据统计服务 -->
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
</properties>
</profile>
</profiles>

9
epmet-gateway/src/main/resources/bootstrap.yml

@ -277,6 +277,15 @@ spring:
filters:
- StripPrefix=1
- CpAuth=true
#内容审核服务
- id: epmet-openapi-scan
uri: @gateway.routes.epmet-openapi-scan.uri@
order: 29
predicates:
- Path=${server.servlet.context-path}/epmetscan/**
filters:
- StripPrefix=1
- CpAuth=true
nacos:
discovery:
server-addr: @nacos.server-addr@

Loading…
Cancel
Save