File tree 4 files changed +14
-83
lines changed
java/ru/mystamps/web/config
4 files changed +14
-83
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
26
26
import org .springframework .context .annotation .Bean ;
27
27
import org .springframework .context .annotation .Configuration ;
28
- import org .springframework .context .annotation .Import ;
29
28
import org .springframework .context .annotation .PropertySource ;
30
29
import org .springframework .core .env .Environment ;
31
30
import org .springframework .data .jpa .repository .config .EnableJpaRepositories ;
42
41
@ EnableTransactionManagement
43
42
@ EnableJpaRepositories ("ru.mystamps.web.dao" )
44
43
@ PropertySource ("classpath:${spring.profiles.active}/spring/database.properties" )
45
- @ Import (DataSourceConfig .class )
46
44
public class DbConfig {
47
45
48
46
@ Inject
Original file line number Diff line number Diff line change @@ -13,11 +13,25 @@ liquibase:
13
13
---
14
14
spring :
15
15
profiles : test
16
+ datasource :
17
+ url : jdbc:h2:mem:mystamps;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false
18
+ username : sa
19
+ password :
20
+ driver-class-name : org.h2.Driver
21
+ initialize : false
16
22
liquibase :
17
23
contexts : scheme, init-data, test-data
18
24
---
19
25
spring :
20
26
profiles : prod
27
+ datasource :
28
+ url : jdbc:mysql://localhost:3306/mystamps
29
+ username : mystamps
30
+ password : q1
31
+ driver-class-name : com.mysql.jdbc.Driver
32
+ initialize : false
33
+ validation-query : SELECT 1
34
+ test-on-borrow : false
21
35
liquibase :
22
36
# see also duplicate definition at pom.xml
23
37
contexts : scheme, init-data, prod-data
Original file line number Diff line number Diff line change 1
- db.driverClassName = com.mysql.jdbc.Driver
2
- db.url = jdbc:mysql://localhost:3306/mystamps
3
- db.username = mystamps
4
- db.password = q1
5
1
jpa.dialectClassName = ru.mystamps.web.support.hibernate.MySql5InnoDbDialect
6
2
jpa.showSql = false
7
3
hibernate.formatSql = true
You can’t perform that action at this time.
0 commit comments