Selaa lähdekoodia

修改使用zk获取配置信息

郭超 4 vuotta sitten
vanhempi
commit
a08f506906

+ 139 - 136
mooctest-user-server/src/main/resources/application.yaml

@@ -1,136 +1,139 @@
-spring.profiles.active: private-cloud-localhost
-server:
-  port: 8081
-
-default:
-  goto: http://127.0.0.1
-  login: http://127.0.0.1:8081/page/login
-
-feature:
-  email: false
-
-foo:
-  bar
-github:
-  clientId: 4e8e65b7e3bdeee9229b
-  clientSecret: a77f1ea04c6f370ec2ad295e29f307565658f8c3
-loggin:
-  access:
-    directory: /home/share/log
-  config: classpath:log4j2.test.yaml
-mail:
-  default-encoding: UTF-8
-  host: smtp.126.com
-  password: xxb19970213
-  username: diors_po@126.com
-mobile:
-  accountSid: 8a216da872fe1ebf0173047c1477033e
-  accountToken: 953f4acac52546ae88a350c93d257b9d
-  appId: 8a216da872fe1ebf0173047c15830345
-mybatis:
-  configuration:
-    map-underscore-to-camel-case: true
-  typeAliasesPackage: cn.iselab.mooctest.user.model
-oss:
-  accessKeyId: LTAI4FdrT3HsfdR5edBVN7ws
-  accessKeySecret: yroxrpm46DzTyzHrLBZzS3MRNIicP6
-  bucketName: mooctest-user-server
-  endPoint: http://oss-cn-shanghai.aliyuncs.com
-
----
-spring:
-  profiles: private-cloud
-  cache:
-    guava:
-      spec:
-        expireAfterWrite: 30s
-  datasource:
-    driver-class-name: com.mysql.jdbc.Driver
-    testWhileIdle: true
-    validationQuery: SELECT 1
-    url: jdbc:mysql://mysql:3306/mooctest_user?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: Customs2019
-  hibernate:
-    ddl-auto: validate
-    naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
-    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
-  jpa:
-    show-sql: true
-
-  redis:
-    host: redis
-    password:
-    pool:
-      max-active: 8
-      max-idle: 8
-      max-wait: -1
-      min-idle: 0
-    port: 6379
-
-  thymeleaf:
-    cache: false
-    content-type: text/html
-    encoding: UTF-8
-    mode: LEGACYHTML5
-    prefix: classpath:/templates/
-    suffix: .html
-
-redirect:
-  url: http://127.0.0.1
-
-website:
-  domainName: 127.0.0.1
-
-wecaht:
-  appSecret: f84db4dc62377926624093b49ac3be1f
-  appId: wx60f06d61f21804be
-
----
-spring:
-  profiles: private-cloud-localhost
-  cache:
-    guava:
-      spec:
-        expireAfterWrite: 30s
-  datasource:
-    driver-class-name: com.mysql.jdbc.Driver
-    testWhileIdle: true
-    validationQuery: SELECT 1
-    url: jdbc:mysql://127.0.0.1:3306/mooctest_user?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: Customs2019
-  hibernate:
-    ddl-auto: validate
-    naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
-    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
-  jpa:
-    show-sql: true
-
-  redis:
-    host: 127.0.0.1
-    password:
-    pool:
-      max-active: 8
-      max-idle: 8
-      max-wait: -1
-      min-idle: 0
-    port: 6379
-
-  thymeleaf:
-    cache: false
-    content-type: text/html
-    encoding: UTF-8
-    mode: LEGACYHTML5
-    prefix: classpath:/templates/
-    suffix: .html
-
-redirect:
-  url: http://127.0.0.1
-
-website:
-  domainName: 127.0.0.1
-
-wecaht:
-  appSecret: f84db4dc62377926624093b49ac3be1f
-  appId: wx60f06d61f21804be
+#spring.profiles.active: private-cloud-localhost
+#server:
+#  port: 8081
+#
+#default:
+#  goto: http://127.0.0.1
+#  login: http://127.0.0.1:8081/page/login
+#
+#foo:
+#  bar
+#github:
+#  clientId: 4e8e65b7e3bdeee9229b
+#  clientSecret: a77f1ea04c6f370ec2ad295e29f307565658f8c3
+#loggin:
+#  access:
+#    directory: /home/share/log
+#  config: classpath:log4j2.test.yaml
+#mail:
+#  default-encoding: UTF-8
+#  host: smtp.126.com
+#  password: xxb19970213
+#  username: diors_po@126.com
+#mobile:
+#  accountSid: 8a216da872fe1ebf0173047c1477033e
+#  accountToken: 953f4acac52546ae88a350c93d257b9d
+#  appId: 8a216da872fe1ebf0173047c15830345
+#mybatis:
+#  configuration:
+#    map-underscore-to-camel-case: true
+#  typeAliasesPackage: cn.iselab.mooctest.user.model
+#oss:
+#  accessKeyId: LTAI4FdrT3HsfdR5edBVN7ws
+#  accessKeySecret: yroxrpm46DzTyzHrLBZzS3MRNIicP6
+#  bucketName: mooctest-user-server
+#  endPoint: http://oss-cn-shanghai.aliyuncs.com
+#
+#---
+#spring:
+#  profiles: private-cloud
+#  cache:
+#    guava:
+#      spec:
+#        expireAfterWrite: 30s
+#  datasource:
+#    driver-class-name: com.mysql.jdbc.Driver
+#    testWhileIdle: true
+#    validationQuery: SELECT 1
+#    url: jdbc:mysql://mysql:3306/mooctest_user?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+#    username: root
+#    password: Customs2019
+#  hibernate:
+#    ddl-auto: validate
+#    naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+#    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
+#  jpa:
+#    show-sql: true
+#
+#  redis:
+#    host: redis
+#    password:
+#    pool:
+#      max-active: 8
+#      max-idle: 8
+#      max-wait: -1
+#      min-idle: 0
+#    port: 6379
+#
+#  thymeleaf:
+#    cache: false
+#    content-type: text/html
+#    encoding: UTF-8
+#    mode: LEGACYHTML5
+#    prefix: classpath:/templates/
+#    suffix: .html
+#
+#feature:
+#  email: true
+#
+#redirect:
+#  url: http://127.0.0.1
+#
+#website:
+#  domainName: 127.0.0.1
+#
+#wecaht:
+#  appSecret: f84db4dc62377926624093b49ac3be1f
+#  appId: wx60f06d61f21804be
+#
+#---
+#spring:
+#  profiles: private-cloud-localhost
+#  cache:
+#    guava:
+#      spec:
+#        expireAfterWrite: 30s
+#  datasource:
+#    driver-class-name: com.mysql.jdbc.Driver
+#    testWhileIdle: true
+#    validationQuery: SELECT 1
+#    url: jdbc:mysql://127.0.0.1:3306/mooctest_user?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+#    username: root
+#    password: Customs2019
+#  hibernate:
+#    ddl-auto: validate
+#    naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+#    properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
+#  jpa:
+#    show-sql: true
+#
+#  redis:
+#    host: 127.0.0.1
+#    password:
+#    pool:
+#      max-active: 8
+#      max-idle: 8
+#      max-wait: -1
+#      min-idle: 0
+#    port: 6379
+#
+#  thymeleaf:
+#    cache: false
+#    content-type: text/html
+#    encoding: UTF-8
+#    mode: LEGACYHTML5
+#    prefix: classpath:/templates/
+#    suffix: .html
+#
+#feature:
+#  email: true
+#
+#redirect:
+#  url: http://127.0.0.1
+#
+#website:
+#  domainName: 127.0.0.1
+#
+#wecaht:
+#  appSecret: f84db4dc62377926624093b49ac3be1f
+#  appId: wx60f06d61f21804be

+ 3 - 3
mooctest-user-server/src/main/resources/bootstrap.yaml

@@ -1,12 +1,12 @@
-#spring.profiles.active: private
+#spring.profiles.active: localhost
 #spring.profiles.active: crowd
-#spring.profiles.active: crowdprod
+spring.profiles.active: cofortest
 spring:
   application:
     name: mooctest-user-server
   cloud:
     zookeeper:
-      enabled: false  # true:开启zookeeper外部化配置, false:读取本地配置;
+      enabled: true  # true:开启zookeeper外部化配置, false:读取本地配置;
       connect-string: 101.37.175.111:2181
       config:
         root: /config