forked from eugenp/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eugenp
committed
Aug 15, 2015
1 parent
3bc0b75
commit 7243b16
Showing
12 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ties/spring/PropertiesWithJavaConfig.java → ...es/external/PropertiesWithJavaConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rties/spring/PropertiesWithXmlConfig.java → ...ies/external/PropertiesWithXmlConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/spring/PropertiesWithXmlConfigOne.java → .../external/PropertiesWithXmlConfigOne.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/spring/PropertiesWithXmlConfigTwo.java → .../external/PropertiesWithXmlConfigTwo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
spring-all/src/main/java/org/baeldung/properties/spring/BasicPropertiesWithJavaConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.baeldung.properties.spring; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.PropertySource; | ||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; | ||
|
||
@Configuration | ||
@PropertySource("classpath:foo.properties") | ||
public class BasicPropertiesWithJavaConfig { | ||
|
||
public BasicPropertiesWithJavaConfig() { | ||
super(); | ||
} | ||
|
||
// beans | ||
|
||
@Bean | ||
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { | ||
return new PropertySourcesPlaceholderConfigurer(); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
spring-all/src/main/resources/basicConfigForPropertiesOne.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd" | ||
> | ||
|
||
<context:property-placeholder location="classpath:foo.properties" ignore-unresolvable="true" order="1"/> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...test/java/org/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...a/org/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
.../test/java/org/baeldung/properties/external/ExternalPropertiesWithXmlIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spring-all/src/test/java/org/baeldung/test/IntegrationTestSuite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters