mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
修改配置文件
This commit is contained in:
@@ -29,7 +29,6 @@ spring:
|
|||||||
# 固定不用改
|
# 固定不用改
|
||||||
easyopen:
|
easyopen:
|
||||||
show-doc: true
|
show-doc: true
|
||||||
mono: false
|
|
||||||
ignore-validate: true
|
ignore-validate: true
|
||||||
|
|
||||||
# 注册中心地址,根据实际情况改,这里只是参数,并不会去注册
|
# 注册中心地址,根据实际情况改,这里只是参数,并不会去注册
|
||||||
|
@@ -0,0 +1,17 @@
|
|||||||
|
server:
|
||||||
|
port: 3333
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: book-service
|
||||||
|
|
||||||
|
cloud:
|
||||||
|
zookeeper:
|
||||||
|
connect-string: localhost:2181
|
||||||
|
|
||||||
|
eureka:
|
||||||
|
port: 1111
|
||||||
|
host: localhost
|
||||||
|
client:
|
||||||
|
serviceUrl:
|
||||||
|
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
@@ -1,9 +1,3 @@
|
|||||||
server:
|
spring:
|
||||||
port: 3333
|
profiles:
|
||||||
|
active: dev
|
||||||
eureka:
|
|
||||||
port: 1111
|
|
||||||
host: localhost
|
|
||||||
client:
|
|
||||||
serviceUrl:
|
|
||||||
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
|
@@ -1,7 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: book-service
|
|
||||||
|
|
||||||
cloud:
|
|
||||||
zookeeper:
|
|
||||||
connect-string: localhost:2181
|
|
@@ -0,0 +1,26 @@
|
|||||||
|
server:
|
||||||
|
port: 2121
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 指定注册中心
|
||||||
|
eureka:
|
||||||
|
port: 1111
|
||||||
|
host: localhost
|
||||||
|
client:
|
||||||
|
serviceUrl:
|
||||||
|
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 指定服务名
|
||||||
|
name: easyopen-service
|
||||||
|
|
||||||
|
# 指定zookeeper
|
||||||
|
cloud:
|
||||||
|
zookeeper:
|
||||||
|
connect-string: localhost:2181
|
||||||
|
|
||||||
|
# 指定接口路径
|
||||||
|
easyopen:
|
||||||
|
prefix-path: /api
|
@@ -1,26 +1,3 @@
|
|||||||
server:
|
|
||||||
port: 2121
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 指定注册中心
|
|
||||||
eureka:
|
|
||||||
port: 1111
|
|
||||||
host: localhost
|
|
||||||
client:
|
|
||||||
serviceUrl:
|
|
||||||
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
profiles:
|
||||||
# 指定服务名
|
active: dev
|
||||||
name: easyopen-service
|
|
||||||
|
|
||||||
# 指定zookeeper
|
|
||||||
cloud:
|
|
||||||
zookeeper:
|
|
||||||
connect-string: localhost:2181
|
|
||||||
|
|
||||||
# 指定接口路径
|
|
||||||
easyopen:
|
|
||||||
prefix-path: /api
|
|
@@ -0,0 +1,19 @@
|
|||||||
|
server:
|
||||||
|
port: 2222
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: story-service
|
||||||
|
description: story服务
|
||||||
|
|
||||||
|
cloud:
|
||||||
|
zookeeper:
|
||||||
|
connect-string: localhost:2181
|
||||||
|
|
||||||
|
# 注册中心
|
||||||
|
eureka:
|
||||||
|
port: 1111
|
||||||
|
host: localhost
|
||||||
|
client:
|
||||||
|
serviceUrl:
|
||||||
|
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
@@ -1,9 +1,3 @@
|
|||||||
server:
|
spring:
|
||||||
port: 2222
|
profiles:
|
||||||
|
active: dev
|
||||||
eureka:
|
|
||||||
port: 1111
|
|
||||||
host: localhost
|
|
||||||
client:
|
|
||||||
serviceUrl:
|
|
||||||
defaultZone: http://${eureka.host}:${eureka.port}/eureka/
|
|
@@ -1,8 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: story-service
|
|
||||||
description: story服务
|
|
||||||
|
|
||||||
cloud:
|
|
||||||
zookeeper:
|
|
||||||
connect-string: localhost:2181
|
|
33
sop-gateway/src/main/resources/application-dev.yml
Normal file
33
sop-gateway/src/main/resources/application-dev.yml
Normal 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
|
@@ -1,24 +1,3 @@
|
|||||||
server:
|
|
||||||
port: 8081
|
|
||||||
|
|
||||||
# 注册中心
|
|
||||||
eureka:
|
|
||||||
serverAddr: localhost:1111
|
|
||||||
client:
|
|
||||||
serviceUrl:
|
|
||||||
defaultZone: http://${eureka.serverAddr}/eureka/
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
cloud:
|
profiles:
|
||||||
gateway: # Spring Cloud Gateway配置,如果用了zuul,这段配置没有效果
|
active: dev
|
||||||
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
|
|
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
spring:
|
|
||||||
application:
|
|
||||||
name: api-gateway
|
|
||||||
|
|
||||||
cloud:
|
|
||||||
zookeeper:
|
|
||||||
connect-string: localhost:2181
|
|
||||||
|
|
||||||
zuul:
|
|
||||||
servlet-path: /api # 入口地址,默认是/zuul
|
|
Reference in New Issue
Block a user