修改配置文件

This commit is contained in:
tanghc
2019-04-16 16:31:07 +08:00
parent 8cc2ce5a9a
commit f9c8a859b7
12 changed files with 105 additions and 93 deletions

View File

@@ -0,0 +1,33 @@
server:
port: 8081
zuul:
# 入口地址,不用改,默认是/zuul
servlet-path: /api
# 注册中心
eureka:
serverAddr: localhost:1111
client:
serviceUrl:
defaultZone: http://${eureka.serverAddr}/eureka/
spring:
application:
name: api-gateway
cloud:
zookeeper:
connect-string: localhost:2181 # zookeeper地址
gateway: # Spring Cloud Gateway配置如果用了zuul这段配置没有效果
discovery:
locator:
lower-case-service-id: true
enabled: true
# 数据源
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username: root
password: root

View File

@@ -1,24 +1,3 @@
server:
port: 8081
# 注册中心
eureka:
serverAddr: localhost:1111
client:
serviceUrl:
defaultZone: http://${eureka.serverAddr}/eureka/
spring:
cloud:
gateway: # Spring Cloud Gateway配置如果用了zuul这段配置没有效果
discovery:
locator:
lower-case-service-id: true
enabled: true
# 数据源
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username: root
password: root
profiles:
active: dev

View File

@@ -1,11 +0,0 @@
spring:
application:
name: api-gateway
cloud:
zookeeper:
connect-string: localhost:2181
zuul:
servlet-path: /api # 入口地址,默认是/zuul