diff --git a/all-in-one/src/main/resources/application-dev.yml b/all-in-one/src/main/resources/application-dev.yml index c50a6ba..d4d39ba 100644 --- a/all-in-one/src/main/resources/application-dev.yml +++ b/all-in-one/src/main/resources/application-dev.yml @@ -31,7 +31,7 @@ jdbc: master: username: root password: hfAhyoTu3UKAfmy27/RNKQ== - url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=true + url: jdbc:mysql://www.microfast.com:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=true driverClass: com.mysql.jdbc.Driver mybatis: typeAliasesPackage: com.lishouyu.pojo diff --git a/all/envBuildBash/echo-hosts.sh b/all/envBuildBash/echo-hosts.sh index fd85380..8295c34 100644 --- a/all/envBuildBash/echo-hosts.sh +++ b/all/envBuildBash/echo-hosts.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -echo "127.0.0.1 www.config.server.com" >> /etc/hosts -echo "127.0.0.1 www.eureka.server.com" >> /etc/hosts -echo "127.0.0.1 www.eureka.server2.com" >> /etc/hosts -echo "127.0.0.1 www.upms.com" >> /etc/hosts -echo "127.0.0.1 www.cms.com" >> /etc/hosts -echo "127.0.0.1 www.ucenter.com" >> /etc/hosts -echo "127.0.0.1 www.gateway.com" >> /etc/hosts -echo "127.0.0.1 www.mall.com" >> /etc/hosts -echo "127.0.0.1 www.pay.com" >> /etc/hosts +echo "192.168.100.26 www.config.com" >> /etc/hosts +echo "192.168.100.26 www.register1.com" >> /etc/hosts +echo "192.168.100.26 www.register2.com" >> /etc/hosts +echo "192.168.100.26 www.upms.com" >> /etc/hosts +echo "192.168.100.26 www.cms.com" >> /etc/hosts +echo "192.168.100.26 www.ucenter.com" >> /etc/hosts +echo "192.168.100.26 www.gateway.com" >> /etc/hosts +echo "192.168.100.26 www.mall.com" >> /etc/hosts +echo "192.168.100.26 www.pay.com" >> /etc/hosts diff --git a/boot-starter/boot-starter-security/boot-starter-security-demo/src/main/resources/application.yml b/boot-starter/boot-starter-security/boot-starter-security-demo/src/main/resources/application.yml index 19115f8..554fdd6 100644 --- a/boot-starter/boot-starter-security/boot-starter-security-demo/src/main/resources/application.yml +++ b/boot-starter/boot-starter-security/boot-starter-security-demo/src/main/resources/application.yml @@ -2,12 +2,12 @@ spring: session: store-type: none # 暂时不开启session存储 datasource: - url: jdbc:mysql://127.0.0.1:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false + url: jdbc:mysql://www.microfast.com:3317/micro?useUncoide=true&chracterEncoding=utf-8&useSSL=false username: root password: studyj2e driver-class-name: com.mysql.jdbc.Driver redis: - host: 127.0.0.1 + host: www.microfast.com port: 6379 #security: # basic: diff --git a/boot-starter/boot-starter-ssm/src/main/java/com/micro/fast/common/config/DataSourceMasterConfig.java b/boot-starter/boot-starter-ssm/src/main/java/com/micro/fast/common/config/DataSourceMasterConfig.java index 6b24829..e245eb0 100644 --- a/boot-starter/boot-starter-ssm/src/main/java/com/micro/fast/common/config/DataSourceMasterConfig.java +++ b/boot-starter/boot-starter-ssm/src/main/java/com/micro/fast/common/config/DataSourceMasterConfig.java @@ -80,7 +80,7 @@ public class DataSourceMasterConfig { //设置能否重置 initParams.put("resetEnable", "false"); //deny优先于allow - initParams.put("allow", "127.0.0.1,172.17.0.1"); + initParams.put("allow", "127.0.0.1,172.17.0.1,www.microfast.com"); //initParams.put("deny","213.122.232.233"); if (logger.isInfoEnabled()) { logger.info("micro-fast common druidServletParam使用默认的配置"); diff --git a/ms/cms/pom.xml b/ms/cms/pom.xml index 2516df9..6f9bbec 100644 --- a/ms/cms/pom.xml +++ b/ms/cms/pom.xml @@ -35,7 +35,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-server org.springframework.cloud diff --git a/ms/cms/src/main/resources/bootstrap.yml b/ms/cms/src/main/resources/bootstrap.yml index 112e77a..6b66522 100644 --- a/ms/cms/src/main/resources/bootstrap.yml +++ b/ms/cms/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 # 从配置中心加载文件 spring: cloud: @@ -17,7 +13,6 @@ spring: eureka: client: serviceUrl: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka/,http://micro:fast@www.microfast.com:10004/eureka/ #配置所有的注册中心 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 \ No newline at end of file + hostname: www.microfast.com \ No newline at end of file diff --git a/ms/config-server/pom.xml b/ms/config-server/pom.xml index af6a65a..eefcb91 100644 --- a/ms/config-server/pom.xml +++ b/ms/config-server/pom.xml @@ -35,7 +35,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-server diff --git a/ms/config-server/src/main/resources/bootstrap.yml b/ms/config-server/src/main/resources/bootstrap.yml index db6aaee..748f56c 100644 --- a/ms/config-server/src/main/resources/bootstrap.yml +++ b/ms/config-server/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 # 程序实例的配置,git仓库的配置 spring: application: @@ -16,8 +12,8 @@ spring: eureka: client: service-url: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka/,http://micro:fast@www.microfast.com:10004/eureka/ #配置所有的注册中心 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 + hostname: www.microfast.com + appname: config-server diff --git a/ms/gateway/pom.xml b/ms/gateway/pom.xml index 0b91dd0..130d52e 100644 --- a/ms/gateway/pom.xml +++ b/ms/gateway/pom.xml @@ -29,7 +29,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-server org.springframework.cloud diff --git a/ms/gateway/src/main/resources/bootstrap.yml b/ms/gateway/src/main/resources/bootstrap.yml index cb90ed8..f1f6236 100644 --- a/ms/gateway/src/main/resources/bootstrap.yml +++ b/ms/gateway/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 # 从配置中心加载文件 spring: cloud: @@ -17,7 +13,7 @@ spring: eureka: client: serviceUrl: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka/,http://micro:fast@www.microfast.com:10004/eureka/ #配置所有的注册中心 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 + hostname: www.microfast.com + diff --git a/ms/register-center1/pom.xml b/ms/register-center1/pom.xml index 730a1a9..a146f59 100644 --- a/ms/register-center1/pom.xml +++ b/ms/register-center1/pom.xml @@ -22,9 +22,13 @@ spring-cloud-starter-config + + + + org.springframework.cloud - spring-cloud-starter-eureka-server + spring-cloud-starter-netflix-eureka-server diff --git a/ms/register-center1/src/main/resources/bootstrap.yml b/ms/register-center1/src/main/resources/bootstrap.yml index 92a7d24..e1167f3 100644 --- a/ms/register-center1/src/main/resources/bootstrap.yml +++ b/ms/register-center1/src/main/resources/bootstrap.yml @@ -1,22 +1,14 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 -config: - server: - ip: 127.0.0.1 #从配置中心加载配置文件,启动eureka-server服务 spring: cloud: config: - uri: http://config:server@${config.server.ip}:10000/ + uri: http://config:server@www.microfast.com:10000/ profile: dev label: master name: eureka-server eureka: client: service-url: - defaultZone: http://micro:fast@${register.server.ip}:10004/eureka #和其他注册中心连接 + defaultZone: http://micro:fast@www.microfast.com:10004/eureka #和其他注册中心连接 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 \ No newline at end of file + hostname: www.microfast.com \ No newline at end of file diff --git a/ms/register-center2/pom.xml b/ms/register-center2/pom.xml index 16f28ff..06c8f06 100644 --- a/ms/register-center2/pom.xml +++ b/ms/register-center2/pom.xml @@ -24,7 +24,7 @@ org.springframework.cloud - spring-cloud-starter-eureka-server + spring-cloud-starter-netflix-eureka-server diff --git a/ms/register-center2/src/main/resources/bootstrap.yml b/ms/register-center2/src/main/resources/bootstrap.yml index 86db6ab..4be8269 100644 --- a/ms/register-center2/src/main/resources/bootstrap.yml +++ b/ms/register-center2/src/main/resources/bootstrap.yml @@ -1,21 +1,13 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 -config: - server: - ip: 127.0.0.1 spring: cloud: config: name: eureka-server2 profile: dev label: master - uri: http://config:server@${config.server.ip}:10000/ + uri: http://config:server@www.microfast.com:10000/ eureka: client: service-url: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka #和其他注册中心连接 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka #和其他注册中心连接 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 \ No newline at end of file + hostname: www.microfast.com \ No newline at end of file diff --git a/ms/ucenter/pom.xml b/ms/ucenter/pom.xml index 90a66ab..ef4d13e 100644 --- a/ms/ucenter/pom.xml +++ b/ms/ucenter/pom.xml @@ -45,7 +45,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-server org.springframework.cloud diff --git a/ms/ucenter/src/main/resources/bootstrap.yml b/ms/ucenter/src/main/resources/bootstrap.yml index b756fc4..c652c7f 100644 --- a/ms/ucenter/src/main/resources/bootstrap.yml +++ b/ms/ucenter/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 # 从配置中心加载文件 spring: cloud: @@ -17,7 +13,6 @@ spring: eureka: client: serviceUrl: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka/,http://micro:fast@www.microfast.com:10004/eureka/ #配置所有的注册中心 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 \ No newline at end of file + hostname: www.microfast.com diff --git a/ms/upms/pom.xml b/ms/upms/pom.xml index 380a1fc..18425a0 100644 --- a/ms/upms/pom.xml +++ b/ms/upms/pom.xml @@ -40,7 +40,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-server org.springframework.cloud diff --git a/ms/upms/src/main/resources/bootstrap.yml b/ms/upms/src/main/resources/bootstrap.yml index 2cf28c5..9d33a70 100644 --- a/ms/upms/src/main/resources/bootstrap.yml +++ b/ms/upms/src/main/resources/bootstrap.yml @@ -1,7 +1,3 @@ -#自定义参数,用于命令行替换,默认值是127.0.0.1 -register: - server: - ip: 127.0.0.1 # 从配置中心加载文件 spring: cloud: @@ -17,7 +13,6 @@ spring: eureka: client: serviceUrl: - defaultZone: http://micro:fast@${register.server.ip}:10002/eureka/,http://micro:fast@${register.server.ip}:10004/eureka/ #配置所有的注册中心 + defaultZone: http://micro:fast@www.microfast.com:10002/eureka/,http://micro:fast@www.microfast.com:10004/eureka/ #配置所有的注册中心 instance: - prefer-ip-address: true - ip-address: 127.0.0.1 \ No newline at end of file + hostname: www.microfast.com