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

ibizdev提交

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