Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JAVA小学生-王铁柱
eladmin
提交
3696c2fb
E
eladmin
项目概览
JAVA小学生-王铁柱
/
eladmin
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
eladmin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3696c2fb
编写于
6月 02, 2019
作者:
Z
zhengjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化 druid 连接池,启动类添加@EnableAsync注解,开启Spring boot 异步支持
上级
94946018
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
31 deletion
+26
-31
eladmin-system/src/main/java/me/zhengjie/AppRun.java
eladmin-system/src/main/java/me/zhengjie/AppRun.java
+2
-0
eladmin-system/src/main/resources/config/application-dev.yml
eladmin-system/src/main/resources/config/application-dev.yml
+12
-16
eladmin-system/src/main/resources/config/application-prod.yml
...min-system/src/main/resources/config/application-prod.yml
+12
-15
未找到文件。
eladmin-system/src/main/java/me/zhengjie/AppRun.java
浏览文件 @
3696c2fb
...
...
@@ -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
...
...
eladmin-system/src/main/resources/config/application-dev.yml
浏览文件 @
3696c2fb
...
...
@@ -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
...
...
eladmin-system/src/main/resources/config/application-prod.yml
浏览文件 @
3696c2fb
...
...
@@ -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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录