提交 7c6c6ccd 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 32da2eba
...@@ -11,9 +11,7 @@ import org.springframework.boot.SpringApplication; ...@@ -11,9 +11,7 @@ import org.springframework.boot.SpringApplication;
@EnableDiscoveryClient @EnableDiscoveryClient
@Configuration @Configuration
@EnableTransactionManagement @EnableTransactionManagement
@SpringBootApplication(exclude = { @SpringBootApplication
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class
})
public class DevBootApplication{ public class DevBootApplication{
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -92,12 +92,6 @@ ...@@ -92,12 +92,6 @@
<artifactId>liquibase-core</artifactId> <artifactId>liquibase-core</artifactId>
</dependency> </dependency>
<!--Mybatis-plus动态数据源-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -5,7 +5,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; ...@@ -5,7 +5,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
@ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master") @ConfigurationProperties(prefix = "spring.datasource")
@Data @Data
public class LiquibaseProp{ public class LiquibaseProp{
......
...@@ -5,36 +5,31 @@ spring: ...@@ -5,36 +5,31 @@ spring:
discovery: discovery:
server-addr: 172.16.102.211:8848 server-addr: 172.16.102.211:8848
datasource: datasource:
dynamic: password: 'E6@8@7ce'
druid: #以下是全局默认值,可以全局更改 username: a_A_5ae9eb39a
filters: stat,wall,log4j2 url: jdbc:mysql://172.16.180.232:3306/a_A_5ae9eb39a?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
#配置初始化大小/最小/最大 driver-class-name: com.mysql.jdbc.Driver
initial-size: 1 filters: stat,wall,log4j2
min-idle: 1 #配置初始化大小/最小/最大
max-active: 20 initial-size: 1
#获取连接等待超时时间 min-idle: 1
max-wait: 60000 max-active: 20
#间隔多久进行一次检测,检测需要关闭的空闲连接 #获取连接等待超时时间
time-between-eviction-runs-millis: 60000 max-wait: 60000
#一个连接在池中最小生存的时间 #间隔多久进行一次检测,检测需要关闭的空闲连接
min-evictable-idle-time-millis: 300000 time-between-eviction-runs-millis: 60000
validation-query: SELECT 1 FROM DUAL #一个连接在池中最小生存的时间
test-while-idle: true min-evictable-idle-time-millis: 300000
test-on-borrow: false validation-query: SELECT 1 FROM DUAL
test-on-return: false test-while-idle: true
#打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false test-on-borrow: false
pool-prepared-statements: false test-on-return: false
max-pool-prepared-statement-per-connection-size: 20 #打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false
primary: master #设置默认的数据源或者数据源组,默认值即为master pool-prepared-statements: false
datasource: max-pool-prepared-statement-per-connection-size: 20
master: isSyncDBSchema: false
username: a_A_5ae9eb39a defaultSchema: a_A_5ae9eb39a
password: 'E6@8@7ce' conf: classpath:liquibase/master.xml
url: jdbc:mysql://172.16.180.232:3306/a_A_5ae9eb39a?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
driver-class-name: com.mysql.jdbc.Driver
isSyncDBSchema: false
defaultSchema: a_A_5ae9eb39a
conf: classpath:liquibase/master.xml
#Mybatis-plus配置 #Mybatis-plus配置
mybatis-plus: mybatis-plus:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册