Skip to content

Commit 4e55227

Browse files
committed
move mysql config to application
1 parent a4c161d commit 4e55227

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

cachecloud-open-common/src/main/resources/jdbc.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

cachecloud-open-web/src/main/resources/application.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ tomcat.backgroundProcessorDelay=30 # secs
1717
server.tomcat.max-threads = 500
1818
server.tomcat.uri-encoding = UTF-8
1919

20+
cachecloud.db.url = ${cachecloud.db.url}
21+
cachecloud.db.user = ${cachecloud.db.user}
22+
cachecloud.db.password = ${cachecloud.db.password}
23+
cachecloud.maxPoolSize = ${cachecloud.maxPoolSize}
24+
jdbc.driver = com.mysql.jdbc.Driver
25+
jdbc.validationQuery = select 1 from dual
26+
2027
cachecloud.admin.user.name=${cachecloud.admin.user.name}
2128
cachecloud.admin.user.password=${cachecloud.admin.user.password}
2229
cachecloud.machine.ssh.port=${cachecloud.machine.ssh.port}

cachecloud-open-web/src/main/resources/spring/spring-mybatis.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
http://www.springframework.org/schema/context
88
http://www.springframework.org/schema/context/spring-context.xsd">
99

10-
<context:property-placeholder location="classpath:jdbc.properties"/>
10+
<context:property-placeholder location="classpath:application.properties"/>
1111

1212
<!--cache data source-->
1313
<bean name="cacheCloudDB" class="com.mchange.v2.c3p0.ComboPooledDataSource">

cachecloud-open-web/src/main/swap/local.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
cachecloud.db.url = jdbc:mysql://127.0.0.1:3306/cache-cloud
2+
cachecloud.db.user = root
3+
cachecloud.db.password =
4+
cachecloud.maxPoolSize = 20
5+
16
cachecloud.machine.username = cachecloud
27
cachecloud.machine.password = cachecloud
38
cachecloud.machine.ssh.port = 22

cachecloud-open-web/src/main/swap/online.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
cachecloud.db.url = jdbc:mysql://127.0.0.1:3306/cache-cloud
2+
cachecloud.db.user = root
3+
cachecloud.db.password =
4+
cachecloud.maxPoolSize = 20
5+
16
cachecloud.machine.username = cachecloud
27
cachecloud.machine.password = cachecloud
38
cachecloud.machine.ssh.port = 22

0 commit comments

Comments
 (0)