From 7f38fb7e636882aea6c3b49e37eea188c6b2ab87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=9E=E6=89=AC?= Date: Mon, 17 Jul 2023 17:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5nacos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coolstore-partner-webb/pom.xml | 10 ++ .../cool/store/PartnerBWebApplication.java | 4 +- .../resources/application-local.properties | 93 ------------------- .../main/resources/bootstrap-dev.properties | 3 + ...cation.properties => bootstrap.properties} | 4 +- coolstore-partner-webc/pom.xml | 10 ++ .../cool/store/PartnerCWebApplication.java | 2 + .../resources/application-local.properties | 74 --------------- .../main/resources/bootstrap-dev.properties | 3 + ...cation.properties => bootstrap.properties} | 5 +- pom.xml | 17 ++++ 11 files changed, 51 insertions(+), 174 deletions(-) delete mode 100644 coolstore-partner-webb/src/main/resources/application-local.properties create mode 100644 coolstore-partner-webb/src/main/resources/bootstrap-dev.properties rename coolstore-partner-webb/src/main/resources/{application.properties => bootstrap.properties} (95%) delete mode 100644 coolstore-partner-webc/src/main/resources/application-local.properties create mode 100644 coolstore-partner-webc/src/main/resources/bootstrap-dev.properties rename coolstore-partner-webc/src/main/resources/{application.properties => bootstrap.properties} (95%) diff --git a/coolstore-partner-webb/pom.xml b/coolstore-partner-webb/pom.xml index 86d6ca8fd..df3dc79fe 100644 --- a/coolstore-partner-webb/pom.xml +++ b/coolstore-partner-webb/pom.xml @@ -29,6 +29,16 @@ com.aliyun.oss aliyun-sdk-oss + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + diff --git a/coolstore-partner-webb/src/main/java/com/cool/store/PartnerBWebApplication.java b/coolstore-partner-webb/src/main/java/com/cool/store/PartnerBWebApplication.java index d0cb8582d..840bbb1a3 100644 --- a/coolstore-partner-webb/src/main/java/com/cool/store/PartnerBWebApplication.java +++ b/coolstore-partner-webb/src/main/java/com/cool/store/PartnerBWebApplication.java @@ -6,8 +6,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.web.servlet.ServletComponentScan; -import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; import org.springframework.scheduling.annotation.EnableAsync; @@ -20,6 +19,7 @@ import javax.sql.DataSource; * @Description: C端web层 * @date 2023-05-17 11:28 */ +@EnableDiscoveryClient @SpringBootApplication @EnableAsync @MapperScan("com.cool.store.mapper") diff --git a/coolstore-partner-webb/src/main/resources/application-local.properties b/coolstore-partner-webb/src/main/resources/application-local.properties deleted file mode 100644 index 3350c3265..000000000 --- a/coolstore-partner-webb/src/main/resources/application-local.properties +++ /dev/null @@ -1,93 +0,0 @@ -#mysql config -default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true -default.datasource.username=hsay -default.datasource.password=Z3J7xBbgouMD - -#redis -spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com -spring.redis.port=6379 -spring.redis.password=Cx111111 -spring.redis.database=0 -spring.redis.timeout=2000ms -spring.redis.lettuce.pool.max-wait=100ms -spring.redis.lettuce.pool.max-active=1024 -spring.redis.lettuce.pool.max-idle=200 -spring.redis.lettuce.pool.min-idle=0 -spring.redis.lettuce.shutdown-timeout=100ms -redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0 -redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2 - -#pagehelper -pagehelper.helper-dialect=mysql -pagehelper.reasonable=false -pagehelper.returnPageInfo=check -pagehelper.support-methods-arguments=false -pagehelper.params=count=countSql -pagehelper.page-size-zero=true - -spring.mvc.async.request-timeout=60000 - -# mybatis config -mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml - -#subtable size -customize_sub_table_size=10 - -mybatis.configuration.call-setters-on-nulls=true -mybatis.configuration.map-underscore-to-camel-case=true - -isv.domain = https://abstore-isv.coolstore.cn/isv - -#rocketmq \u914D\u7F6E -rocketmq.accessKey=zK2oVEz4G1ts23d2 -rocketmq.secretKey=0UstLCS0mh2ASgBh -rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080 -rocketmq.topic=simple_message - -#oss配置 -oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur -oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2 -oss.endpoint=oss-cn-hangzhou.aliyuncs.com -oss.bucket=cool-store-hsay -oss.file.dir = partner/171cddee76471740/ -#企业corpId -corp.id = 171cddee76471740 -#cdn地址 -cdn.url=https://testhsaypic.coolstore.cn - -#TRTC -trtc.sdkAppId=1400811820 -trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219 -trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8 - -weixin.appId=wx6f984e535e571818 -weixin.appSecret=245a483747e6e9f8762d3e8539cf0318 - -signKey=77fea013c3a6459685b83c21a2fc3411 -fixMobileOpenid=HSAY5531DA7 -#MDM -hs.mdm.baseUrl=http://10.56.21.30 -hs.mdm.appkey = HSAYPartner -hs.mdm.appsec = ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3 - -#sms -hs.sms.accessKeyId = LTAI4GEZKz9PBqqKa3hjup3W -hs.sms.accessKeySecret = iVOiK74k7C1wVbuUbipgJbfpAh1Zdb -hs.sms.templateCode = SMS_461530041 - -xxl.job.admin.addresses = -xxl.job.executor.appname = ${spring.application.name} -xxl.job.executor.ip = -xxl.job.executor.port = 30201 -xxl.job.executor.logpath = logs/xxl-job/jobhandler -xxl.job.executor.logretentiondays = 30 -xxl.job.accessToken = - -ec.baseUrl=http://127.0.0.1:8017 -#飞书通知 -feishu.notice.link.url = https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench - -#阿里云ak sk -aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1 -aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd -aliyun.authCode=Y81FVZepk6 \ No newline at end of file diff --git a/coolstore-partner-webb/src/main/resources/bootstrap-dev.properties b/coolstore-partner-webb/src/main/resources/bootstrap-dev.properties new file mode 100644 index 000000000..73e64f0f1 --- /dev/null +++ b/coolstore-partner-webb/src/main/resources/bootstrap-dev.properties @@ -0,0 +1,3 @@ +spring.cloud.nacos.discovery.server-addr=192.168.1.202:8848 +spring.cloud.nacos.config.server-addr=192.168.1.202:8848 +spring.cloud.nacos.config.file-extension=properties \ No newline at end of file diff --git a/coolstore-partner-webb/src/main/resources/application.properties b/coolstore-partner-webb/src/main/resources/bootstrap.properties similarity index 95% rename from coolstore-partner-webb/src/main/resources/application.properties rename to coolstore-partner-webb/src/main/resources/bootstrap.properties index dc6e86bd0..e8cb5a145 100644 --- a/coolstore-partner-webb/src/main/resources/application.properties +++ b/coolstore-partner-webb/src/main/resources/bootstrap.properties @@ -1,5 +1,5 @@ -spring.application.name=coolstore-partner-webb -spring.profiles.active=@profileActive@ +spring.application.name=hsay-partner-webb +spring.profiles.active=dev server.port=31000 server.servlet.context-path=/partner/pc diff --git a/coolstore-partner-webc/pom.xml b/coolstore-partner-webc/pom.xml index fbca9fc1d..ff2e9d8fc 100644 --- a/coolstore-partner-webc/pom.xml +++ b/coolstore-partner-webc/pom.xml @@ -33,6 +33,16 @@ com.aliyun.oss aliyun-sdk-oss + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + diff --git a/coolstore-partner-webc/src/main/java/com/cool/store/PartnerCWebApplication.java b/coolstore-partner-webc/src/main/java/com/cool/store/PartnerCWebApplication.java index 03c3874f3..8aded9388 100644 --- a/coolstore-partner-webc/src/main/java/com/cool/store/PartnerCWebApplication.java +++ b/coolstore-partner-webc/src/main/java/com/cool/store/PartnerCWebApplication.java @@ -8,6 +8,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; import org.springframework.scheduling.annotation.EnableAsync; @@ -20,6 +21,7 @@ import javax.sql.DataSource; * @Description: B端web层 * @date 2023-05-17 11:28 */ +@EnableDiscoveryClient @SpringBootApplication @MapperScan("com.cool.store.mapper") @EnableAsync diff --git a/coolstore-partner-webc/src/main/resources/application-local.properties b/coolstore-partner-webc/src/main/resources/application-local.properties deleted file mode 100644 index 94027cc8b..000000000 --- a/coolstore-partner-webc/src/main/resources/application-local.properties +++ /dev/null @@ -1,74 +0,0 @@ -#mysql config -default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true -default.datasource.username=hsay -default.datasource.password=Z3J7xBbgouMD - -#redis -spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com -spring.redis.port=6379 -spring.redis.password=Cx111111 -spring.redis.database=0 -spring.redis.timeout=2000ms -spring.redis.lettuce.pool.max-wait=100ms -spring.redis.lettuce.pool.max-active=1024 -spring.redis.lettuce.pool.max-idle=200 -spring.redis.lettuce.pool.min-idle=0 -spring.redis.lettuce.shutdown-timeout=100ms -redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0 -redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2 - -#pagehelper -pagehelper.helper-dialect=mysql -pagehelper.reasonable=false -pagehelper.returnPageInfo=check -pagehelper.support-methods-arguments=false -pagehelper.params=count=countSql -pagehelper.page-size-zero=true - -spring.mvc.async.request-timeout=60000 - -# mybatis config -mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml - -#subtable size -customize_sub_table_size=10 - -mybatis.configuration.call-setters-on-nulls=true -mybatis.configuration.map-underscore-to-camel-case=true - -isv.domain = https://abstore-isv.coolstore.cn/isv - -#rocketmq \u914D\u7F6E -rocketmq.accessKey=LTAI5t5ouXZuFgxJMbQea3b2 -rocketmq.secretKey=yuomDstRjSdihtN5zo8viDbWu8Z0ig -rocketmq.nameSrvAdder=http://MQ_INST_1947409023213164_BX3sLZnA.cn-hangzhou.mq-internal.aliyuncs.com:8080 -rocketmq.topic=simple_message - -#oss配置 -oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur -oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2 -oss.endpoint=oss-cn-hangzhou.aliyuncs.com -oss.bucket=cool-store-hsay -oss.file.dir = partner/171cddee76471740/ -#企业corpId -corp.id = 171cddee76471740 -#cdn地址 -cdn.url=https://testhsaypic.coolstore.cn - -#TRTC -trtc.sdkAppId=1400811820 -trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219 - -weixin.appId=wxb2a0addf956ad4b7 -weixin.appSecret=77abdcae754add92889566b543e5ad79 - -signKey=77fea013c3a6459685b83c21a2fc3411 -fixMobileOpenid=HSAY5531DA7 - -#飞书通知 -feishu.notice.link.url = https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench - -#阿里云ak sk -aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1 -aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd -aliyun.authCode=Y81FVZepk6 \ No newline at end of file diff --git a/coolstore-partner-webc/src/main/resources/bootstrap-dev.properties b/coolstore-partner-webc/src/main/resources/bootstrap-dev.properties new file mode 100644 index 000000000..73e64f0f1 --- /dev/null +++ b/coolstore-partner-webc/src/main/resources/bootstrap-dev.properties @@ -0,0 +1,3 @@ +spring.cloud.nacos.discovery.server-addr=192.168.1.202:8848 +spring.cloud.nacos.config.server-addr=192.168.1.202:8848 +spring.cloud.nacos.config.file-extension=properties \ No newline at end of file diff --git a/coolstore-partner-webc/src/main/resources/application.properties b/coolstore-partner-webc/src/main/resources/bootstrap.properties similarity index 95% rename from coolstore-partner-webc/src/main/resources/application.properties rename to coolstore-partner-webc/src/main/resources/bootstrap.properties index 7728a30a3..0f8e4f464 100644 --- a/coolstore-partner-webc/src/main/resources/application.properties +++ b/coolstore-partner-webc/src/main/resources/bootstrap.properties @@ -1,6 +1,5 @@ -spring.application.name=coolstore-partner-webc -spring.profiles.active=@profileActive@ - +spring.application.name=hsay-partner-webc +spring.profiles.active=dev server.port=30900 server.servlet.context-path=/partner/mini/program diff --git a/pom.xml b/pom.xml index 67fe71dbf..e4b63e2a5 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,8 @@ 8 8 + Hoxton.SR4 + 2.2.0.RELEASE @@ -196,6 +198,21 @@ aspectjweaver 1.9.5 + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud-alibaba.version} + pom + import +