From cfea56bfa111caba7867a6e367f3181b5fb993ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=80=A1?= Date: Tue, 24 Jun 2025 16:07:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=88=86=E6=94=AF=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 ++ .../BizServiceEbtpExtendApplication.java | 2 +- .../extend/singlePoint/common/GmBaseUtil.java | 4 +- src/main/resources/application-dev.yml | 80 +++++++++++-------- src/main/resources/application.yml | 6 -- 5 files changed, 54 insertions(+), 44 deletions(-) diff --git a/pom.xml b/pom.xml index d14eeaf..12ad2e2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,12 @@ com.chinaunicom.mall.ebtp uboot-core 2.4.1-zyhy-SNAPSHOT + + + sharding-jdbc-spring-boot-starter + org.apache.shardingsphere + + diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java index 0b98460..6ff8cb8 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/BizServiceEbtpExtendApplication.java @@ -16,7 +16,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.scheduling.annotation.EnableAsync; -@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class}) +@SpringBootApplication @EnableFeignClients @MapperScan({"com.chinaunicom.mall.ebtp.extend.**.dao"}) @ComponentScan("com.chinaunicom.mall.ebtp.*") diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/singlePoint/common/GmBaseUtil.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/singlePoint/common/GmBaseUtil.java index cc80824..fd984d3 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/singlePoint/common/GmBaseUtil.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/singlePoint/common/GmBaseUtil.java @@ -1,6 +1,6 @@ package com.chinaunicom.mall.ebtp.extend.singlePoint.common; -import groovy.util.logging.Slf4j; +import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -13,7 +13,7 @@ import java.security.Security; @Slf4j public class GmBaseUtil { private static final Logger logger = LoggerFactory.getLogger(GmBaseUtil.class); - + protected GmBaseUtil() { logger.info("GmBaseUtil"); } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index d9fd035..2496558 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -7,7 +7,7 @@ spring: cloud: nacos: discovery: - server-addr: 127.0.0.1:8848 + server-addr: 10.60.161.59:8848 aop: auto: true #开启spring的aop配置 proxy-target-class: true @@ -15,33 +15,29 @@ spring: application: name: biz-service-ebtp-extend - shardingsphere: - datasource: - names: ds0 - ds0: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: Unicom@2024 - jdbc-url: jdbc:mysql://59.110.10.99:53306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - url: jdbc:mysql://59.110.10.99:53306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - filters: stat,wall,log4j - maxActive: 20 - initialSize: 1 - maxWait: 60000 - minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 - validationQuery: select 'x' - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - poolPreparedStatements: true - maxOpenPreparedStatements: 20 - connection-properties: druid.stat.mergeSql=ture;druid.stat.slowSqlMillis=5000 - props: - sql: - show: true + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: Unicom@2024 + url: jdbc:mysql://59.110.10.99:53306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + druid: + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connection-properties: druid.stat.mergeSql=ture;druid.stat.slowSqlMillis=5000 + props: + sql: + show: true jackson: date-format: yyyy-MM-dd HH:mm:ss @@ -51,7 +47,8 @@ spring: # 天宫Kafka增加了安全认证,需要配置安全属性 kafka: - bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005 +# bootstrap-servers: 10.125.164.192:32005,10.125.164.193:32005,10.125.164.194:32005 + bootstrap-servers: 127.0.0.1:2181 template: default-topic: jl_test @@ -76,14 +73,13 @@ spring: redis: sentinel: master: mymaster -# nodes: 10.60.161.59:26379, 10.60.161.59:26380, 10.60.161.59:26381 - nodes: localhost:26379, localhost:26380, localhost:26381 + nodes: localhost:26379 password: pass database: - idempotent: 1 sharding: 1 - cache: 1 - userinfo: 1 + cache: 2 + idempotent: 3 + userinfo: 4 # 邮件配置 mail: @@ -120,7 +116,16 @@ spring: username: SRM password: Fjm123!@# token: e48fa67e-d991-3542-b486-94e26a05425d - + dt: + url: 1 + app_key: 1 + app_secret: 1 + app_id: 1 + ioa: + url: 1 + app_id: 1 + app_secret: 1 + base-url: 1 mybatis-plus: configuration: @@ -148,6 +153,7 @@ feign: default: connect-timeout: 20000 read-timeout: 20000 + logger-level: full hystrix: command: @@ -186,6 +192,10 @@ mconfig: file: font-address: /storage/fonts/ upload-address: /storage/reviewReport/ + ioa: + app_id: g8Jdg7kJLc + app_secret: d72d9660ac344f6af782ec9c3cb78648cb2250c7 + base_url: http://10.18.55.175:19997 document: clientHttpUrl: http://10.242.31.158:8100/auth/oauth/token?grant_type=client_credentials&client_id=bVS46ElU&client_secret=58ea04ba02475c8da2321cc99849d2a10f15b749 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 636375c..9f58f91 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,12 +6,6 @@ spring: profiles: active: dev -# Apollo 配置信息 -apollo: - bootstrap: - enabled: true - namespace: application - client: clientHttpUrl: 1