File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
java/ru/mystamps/web/config Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 27
27
import org .springframework .beans .factory .annotation .Value ;
28
28
import org .springframework .context .annotation .Bean ;
29
29
import org .springframework .context .annotation .Configuration ;
30
- import org .springframework .context .annotation .PropertySource ;
30
+ import org .springframework .context .annotation .ImportResource ;
31
31
import org .springframework .orm .jpa .JpaTransactionManager ;
32
32
import org .springframework .orm .jpa .JpaVendorAdapter ;
33
33
import org .springframework .orm .jpa .LocalContainerEntityManagerFactoryBean ;
37
37
38
38
@ Configuration
39
39
@ EnableTransactionManagement
40
- @ PropertySource ("classpath:spring/database.properties " )
40
+ @ ImportResource ("classpath:spring/database.xml " )
41
41
public class DbConfig {
42
42
43
43
@ Value ("${jpa.showSql}" )
Original file line number Diff line number Diff line change 25
25
import org .springframework .beans .factory .annotation .Value ;
26
26
import org .springframework .context .annotation .Bean ;
27
27
import org .springframework .context .annotation .Configuration ;
28
+ import org .springframework .context .annotation .ImportResource ;
28
29
import org .springframework .context .annotation .Profile ;
29
- import org .springframework .context .annotation .PropertySource ;
30
30
31
31
@ Configuration
32
32
@ Profile ("dev" )
33
- @ PropertySource ("classpath:spring/database.properties " )
33
+ @ ImportResource ("classpath:spring/database.xml " )
34
34
public class DevDataSource {
35
35
36
36
@ Value ("${db.driverClassName}" )
Original file line number Diff line number Diff line change
1
+ <beans xmlns =" http://www.springframework.org/schema/beans"
2
+ xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
3
+ xmlns:context=" http://www.springframework.org/schema/context"
4
+ xsi:schemaLocation=" http://www.springframework.org/schema/beans
5
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
6
+ http://www.springframework.org/schema/context
7
+ http://www.springframework.org/schema/context/spring-context-3.1.xsd" >
8
+
9
+ <context : property-placeholder location =" classpath:spring/database.properties" />
10
+
11
+ </beans >
You can’t perform that action at this time.
0 commit comments