work on properties
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.properties.spring;
|
||||
package org.baeldung.properties.external;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.properties.spring;
|
||||
package org.baeldung.properties.external;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.properties.spring;
|
||||
package org.baeldung.properties.external;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.properties.spring;
|
||||
package org.baeldung.properties.external;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
+23
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user