mirror of
https://github.com/drtrang/druid-spring-boot.git
synced 2026-11-23 14:04:18 +00:00
example
This commit is contained in:
+4
-5
@@ -1,7 +1,6 @@
|
||||
package com.github.trang.druid.example.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.github.trang.druid.autoconfigure.DruidDataSourceCustomizer;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -23,10 +22,10 @@ import java.util.Map;
|
||||
public class SpringDataSourceConfig {
|
||||
|
||||
// @Bean
|
||||
public DruidDataSourceCustomizer druidDataSourceCustomizer() {
|
||||
System.out.println("DruidDataSourceCustomizer...");
|
||||
return (dataSource) -> dataSource.setMaxActive(66);
|
||||
}
|
||||
// public DruidDataSourceCustomizer druidDataSourceCustomizer() {
|
||||
// System.out.println("DruidDataSourceCustomizer...");
|
||||
// return (dataSource) -> dataSource.setMaxActive(66);
|
||||
// }
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ spring:
|
||||
db-type: h2
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
slf4j:
|
||||
enabled: true
|
||||
connection-log-enabled: false
|
||||
|
||||
Reference in New Issue
Block a user