fix bugs
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.core.db.config;
|
||||
|
||||
import org.springblade.core.launch.props.BladePropertySource;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
|
||||
/**
|
||||
* 数据源配置类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@BladePropertySource(value = "classpath:/blade-db.yml")
|
||||
public class DbConfiguration {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Created by Blade.
|
||||
*
|
||||
* @author zhuangqian
|
||||
*/
|
||||
package org.springblade.core.db;
|
||||
39
blade-core-db/src/main/resources/blade-db.yml
Normal file
39
blade-core-db/src/main/resources/blade-db.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
#spring-datasource配置
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
initial-size: 5
|
||||
max-active: 20
|
||||
min-idle: 5
|
||||
max-wait: 60000
|
||||
# MySql、PostgreSQL校验
|
||||
validation-query: select 1
|
||||
# Oracle校验
|
||||
#validation-query: select 1 from dual
|
||||
validation-query-timeout: 2000
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
test-while-idle: true
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
login-username: blade
|
||||
login-password: 1qaz@WSX
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
url-pattern: /*
|
||||
exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
|
||||
session-stat-enable: true
|
||||
session-stat-max-count: 10
|
||||
#hikari:
|
||||
#connection-test-query: SELECT 1 FROM DUAL
|
||||
#connection-timeout: 30000
|
||||
#maximum-pool-size: 5
|
||||
#max-lifetime: 1800000
|
||||
#minimum-idle: 1
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user