diff --git a/sop-admin/sop-admin-server/src/main/resources/application-dev.yml b/sop-admin/sop-admin-server/src/main/resources/application-dev.yml index 6d114c50..8364ef51 100644 --- a/sop-admin/sop-admin-server/src/main/resources/application-dev.yml +++ b/sop-admin/sop-admin-server/src/main/resources/application-dev.yml @@ -29,7 +29,6 @@ spring: # 固定不用改 easyopen: show-doc: true - mono: false ignore-validate: true # 注册中心地址,根据实际情况改,这里只是参数,并不会去注册 diff --git a/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml b/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml new file mode 100644 index 00000000..ad32b8aa --- /dev/null +++ b/sop-example/sop-book/sop-book-web/src/main/resources/application-dev.yml @@ -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/ \ No newline at end of file diff --git a/sop-example/sop-book/sop-book-web/src/main/resources/application.yml b/sop-example/sop-book/sop-book-web/src/main/resources/application.yml index 2a74db4e..caf4dfcd 100644 --- a/sop-example/sop-book/sop-book-web/src/main/resources/application.yml +++ b/sop-example/sop-book/sop-book-web/src/main/resources/application.yml @@ -1,9 +1,3 @@ -server: - port: 3333 - -eureka: - port: 1111 - host: localhost - client: - serviceUrl: - defaultZone: http://${eureka.host}:${eureka.port}/eureka/ \ No newline at end of file +spring: + profiles: + active: dev \ No newline at end of file diff --git a/sop-example/sop-book/sop-book-web/src/main/resources/bootstrap.yml b/sop-example/sop-book/sop-book-web/src/main/resources/bootstrap.yml deleted file mode 100644 index ca23c4f1..00000000 --- a/sop-example/sop-book/sop-book-web/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,7 +0,0 @@ -spring: - application: - name: book-service - - cloud: - zookeeper: - connect-string: localhost:2181 \ No newline at end of file diff --git a/sop-example/sop-easyopen/src/main/resources/application-dev.yml b/sop-example/sop-easyopen/src/main/resources/application-dev.yml new file mode 100644 index 00000000..73b63102 --- /dev/null +++ b/sop-example/sop-easyopen/src/main/resources/application-dev.yml @@ -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 diff --git a/sop-example/sop-easyopen/src/main/resources/application.yml b/sop-example/sop-easyopen/src/main/resources/application.yml index 73b63102..caf4dfcd 100644 --- a/sop-example/sop-easyopen/src/main/resources/application.yml +++ b/sop-example/sop-easyopen/src/main/resources/application.yml @@ -1,26 +1,3 @@ -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 + profiles: + active: dev \ No newline at end of file diff --git a/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml new file mode 100644 index 00000000..6130f136 --- /dev/null +++ b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.yml @@ -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/ \ No newline at end of file diff --git a/sop-example/sop-story/sop-story-web/src/main/resources/application.yml b/sop-example/sop-story/sop-story-web/src/main/resources/application.yml index 2972c510..caf4dfcd 100644 --- a/sop-example/sop-story/sop-story-web/src/main/resources/application.yml +++ b/sop-example/sop-story/sop-story-web/src/main/resources/application.yml @@ -1,9 +1,3 @@ -server: - port: 2222 - -eureka: - port: 1111 - host: localhost - client: - serviceUrl: - defaultZone: http://${eureka.host}:${eureka.port}/eureka/ \ No newline at end of file +spring: + profiles: + active: dev \ No newline at end of file diff --git a/sop-example/sop-story/sop-story-web/src/main/resources/bootstrap.yml b/sop-example/sop-story/sop-story-web/src/main/resources/bootstrap.yml deleted file mode 100644 index 0a4dcf3e..00000000 --- a/sop-example/sop-story/sop-story-web/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,8 +0,0 @@ -spring: - application: - name: story-service - description: story服务 - - cloud: - zookeeper: - connect-string: localhost:2181 \ No newline at end of file diff --git a/sop-gateway/src/main/resources/application-dev.yml b/sop-gateway/src/main/resources/application-dev.yml new file mode 100644 index 00000000..61c3afe3 --- /dev/null +++ b/sop-gateway/src/main/resources/application-dev.yml @@ -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 \ No newline at end of file diff --git a/sop-gateway/src/main/resources/application.yml b/sop-gateway/src/main/resources/application.yml index ef37639b..caf4dfcd 100644 --- a/sop-gateway/src/main/resources/application.yml +++ b/sop-gateway/src/main/resources/application.yml @@ -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 \ No newline at end of file + profiles: + active: dev \ No newline at end of file diff --git a/sop-gateway/src/main/resources/bootstrap.yml b/sop-gateway/src/main/resources/bootstrap.yml deleted file mode 100644 index 2d360fb3..00000000 --- a/sop-gateway/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,11 +0,0 @@ - -spring: - application: - name: api-gateway - - cloud: - zookeeper: - connect-string: localhost:2181 - -zuul: - servlet-path: /api # 入口地址,默认是/zuul