Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
project-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭燕飞
project-template
Commits
be453b77
Commit
be453b77
authored
Jan 31, 2018
by
郭燕飞
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
59e0fcbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
Application.java
service-template/biz/Application.java
+1
-1
application.properties
service-template/biz/application.properties
+25
-0
sqlMapConfig.xml
service-template/biz/sqlMapConfig.xml
+0
-9
No files found.
service-template/biz/Application.java
View file @
be453b77
package
{
groupId
}.{
artifactIdPackage
}
.
biz
;
package
{
groupId
}.{
artifactIdPackage
};
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
service-template/biz/application.properties
View file @
be453b77
...
...
@@ -5,3 +5,28 @@ server.tomcat.uri-encoding=UTF-8
#logging
logging.path
=
${user.home}/logs/{artifactId}
# 数据源配置
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.type
=
org.apache.commons.dbcp2.BasicDataSource
spring.datasource.url
=
jdbc:mysql://dev.config.duibar.com:3306/demo
spring.datasource.username
=
dev
spring.datasource.password
=
dev_fas015
spring.datasource.dbcp2.max-total
=
30
spring.datasource.dbcp2.initial-size
=
5
spring.datasource.dbcp2.max-idle
=
3
spring.datasource.dbcp2.min-idle
=
3
spring.datasource.dbcp2.max-wait-millis
=
30000
spring.datasource.dbcp2.remove-abandoned-on-borrow
=
true
spring.datasource.dbcp2.remove-abandoned-on-maintenance
=
true
# 这个参数配置后,一个连接被借出连接池超过这个时间不归还会认为是泄露的链接
spring.datasource.dbcp2.remove-abandoned-timeout
=
60
spring.datasource.dbcp2.log-abandoned
=
true
spring.datasource.dbcp2.test-on-borrow
=
false
# 多久testWhileIdle
spring.datasource.dbcp2.time-between-eviction-runs-millis
=
90000
# 池中的连接空闲多久后被回收,默认值就是30分钟。
spring.datasource.dbcp2.min-evictable-idle-time-millis
=
600000
spring.datasource.dbcp2.validation-query
=
SELECT 1
spring.datasource.dbcp2.test-while-idle
=
true
spring.datasource.dbcp2.connection-init-sqls
=
set names utf8mb4;
\ No newline at end of file
service-template/biz/sqlMapConfig.xml
deleted
100644 → 0
View file @
59e0fcbf
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
</settings>
</configuration>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment