diff --git a/pom.xml b/pom.xml index 1898dd3..4bd908d 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,20 @@ 4.1.0 + + com.gbase + gbase-jdbc + system + 8.3.81.53-build55.2.1-bin + ${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar + + + + com.alibaba + druid-spring-boot-starter + 1.2.22 + + @@ -154,6 +168,7 @@ org.springframework.boot spring-boot-maven-plugin + true org.projectlombok diff --git a/src/main/java/com/biutag/supervision/service/BaseUserService.java b/src/main/java/com/biutag/supervision/service/BaseUserService.java index 6593f88..dc5f584 100644 --- a/src/main/java/com/biutag/supervision/service/BaseUserService.java +++ b/src/main/java/com/biutag/supervision/service/BaseUserService.java @@ -5,18 +5,16 @@ import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.mapper.BaseUserMapper; import com.biutag.supervision.pojo.dto.UserDto; import com.biutag.supervision.pojo.entity.BaseRole; import com.biutag.supervision.pojo.entity.BaseRoleUser; import com.biutag.supervision.pojo.entity.BaseUser; -import com.biutag.supervision.mapper.BaseUserMapper; import com.biutag.supervision.pojo.model.UserModel; import com.biutag.supervision.pojo.param.UserQueryParam; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.ArrayList; diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 516f3d9..ec385cd 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,20 +3,41 @@ spring: dynamic: datasource: master: + type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://172.31.217.20:31868/negative?serverTimezone=GMT%2B8 username: root password: ip12341234 slave: + type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://172.31.217.20:31868/open-platform?serverTimezone=GMT%2B8 username: root password: ip12341234 slave2: + type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://172.31.217.20:31868/negative?serverTimezone=GMT%2B8 username: root password: ip12341234 + druid: + min-evictable-idle-time-millis: 300000 + test-on-borrow: false + test-on-return: false + initial-size: 10 + min-idle: 10 + max-wait: 60000 + pool-prepared-statements: true + test-while-idle: true + validation-query: select 1 + time-between-eviction-runs-millis: 60000 + max-pool-prepared-statement-per-connection-size: 20 + max-active: 100 + # druid监控全局配置 + druid: + stat-view-servlet: + enabled: true + url-pattern: /druid/* data: redis: host: 172.31.217.20 diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 0d9c482..a069d45 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -3,20 +3,41 @@ spring: dynamic: datasource: master: + type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://65.47.6.109:3306/negative?serverTimezone=GMT%2B8&useSSL=false username: root password: ip12341234 slave: + type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://65.47.6.109:3306/open-platform?serverTimezone=GMT%2B8&useSSL=false username: root password: ip12341234 slave2: - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://65.47.16.209:5258/csga_dwd?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF8 + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.gbase.jdbc.Driver + url: jdbc:gbase://65.47.16.209:5258/csga_dwd username: csga_wdpc password: csga_wdpc@123 + druid: + min-evictable-idle-time-millis: 300000 + test-on-borrow: false + test-on-return: false + initial-size: 10 + min-idle: 10 + max-wait: 60000 + pool-prepared-statements: true + test-while-idle: true + validation-query: select 1 + time-between-eviction-runs-millis: 60000 + max-pool-prepared-statement-per-connection-size: 20 + max-active: 100 + # druid监控全局配置 + druid: + stat-view-servlet: + enabled: true + url-pattern: /druid/* data: redis: host: 65.47.6.109 diff --git a/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar b/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar new file mode 100644 index 0000000..778cd39 Binary files /dev/null and b/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar differ