diff --git a/eladmin-system/src/main/java/me/zhengjie/AppRun.java b/eladmin-system/src/main/java/me/zhengjie/AppRun.java index 700a3a2b..c578e14e 100644 --- a/eladmin-system/src/main/java/me/zhengjie/AppRun.java +++ b/eladmin-system/src/main/java/me/zhengjie/AppRun.java @@ -4,6 +4,7 @@ import me.zhengjie.utils.SpringContextHolder; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; +import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; @@ -11,6 +12,7 @@ import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBr * @author jie * @date 2018/11/15 9:20:19 */ +@EnableAsync @SpringBootApplication @EnableTransactionManagement @EnableWebSocketMessageBroker diff --git a/eladmin-system/src/main/resources/config/application-dev.yml b/eladmin-system/src/main/resources/config/application-dev.yml index 988b86d1..866fc6e1 100644 --- a/eladmin-system/src/main/resources/config/application-dev.yml +++ b/eladmin-system/src/main/resources/config/application-dev.yml @@ -8,27 +8,23 @@ spring: username: root password: 123456 - # 初始化连接大小 - initial-size: 5 - # 最小空闲连接数 - min-idle: 5 - max-active: 20 - max-wait: 30000 - # 可关闭的空闲连接间隔时间 - time-between-eviction-runs-millis: 60000 - # 配置连接在池中的最小生存时间 - min-evictable-idle-time-millis: 300000 - validation-query: select '1' from dual + # 初始化配置 + initial-size: 3 + # 最小连接数 + min-idle: 3 + # 最大连接数 + max-active: 15 + # 获取连接超时时间 + max-wait: 5000 + # 连接有效性检测时间 + time-between-eviction-runs-millis: 90000 + # 最大空闲时间 + min-evictable-idle-time-millis: 1800000 test-while-idle: true test-on-borrow: false test-on-return: false - # 打开PSCache,并且指定每个连接上PSCache的大小 - pool-prepared-statements: true - max-open-prepared-statements: 20 - max-pool-prepared-statement-per-connection-size: 20 # 配置监控统计拦截的filters filters: stat - stat-view-servlet: url-pattern: /druid/* reset-enable: false diff --git a/eladmin-system/src/main/resources/config/application-prod.yml b/eladmin-system/src/main/resources/config/application-prod.yml index 54d5d778..f8ad3c0c 100644 --- a/eladmin-system/src/main/resources/config/application-prod.yml +++ b/eladmin-system/src/main/resources/config/application-prod.yml @@ -8,24 +8,21 @@ spring: username: root password: 123456 - # 初始化连接大小 - initial-size: 5 - # 最小空闲连接数 - min-idle: 5 - max-active: 20 - max-wait: 30000 - # 可关闭的空闲连接间隔时间 - time-between-eviction-runs-millis: 60000 - # 配置连接在池中的最小生存时间 - min-evictable-idle-time-millis: 300000 - validation-query: select '1' from dual + # 初始化配置 + initial-size: 3 + # 最小连接数 + min-idle: 3 + # 最大连接数 + max-active: 15 + # 获取连接超时时间 + max-wait: 5000 + # 连接有效性检测时间 + time-between-eviction-runs-millis: 90000 + # 最大空闲时间 + min-evictable-idle-time-millis: 1800000 test-while-idle: true test-on-borrow: false test-on-return: false - # 打开PSCache,并且指定每个连接上PSCache的大小 - pool-prepared-statements: true - max-open-prepared-statements: 20 - max-pool-prepared-statement-per-connection-size: 20 # 配置监控统计拦截的filters filters: stat