Skip to content

Commit 1152523

Browse files
committed
[improve] Set the profile programmatically
1 parent 7414fa4 commit 1152523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

d01/d01s05/d01s05e04-environment-usage/src/main/java/net/safedata/spring/training/d01/s05/EnvironmentUsageDemo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class EnvironmentUsageDemo {
1515
private static final String PROFILES_ACTIVATION_PROPERTY = "spring.profiles.active";
1616

1717
public static void main(String[] args) {
18-
System.setProperty(PROFILES_ACTIVATION_PROPERTY, Profiles.PROD);
18+
System.setProperty(PROFILES_ACTIVATION_PROPERTY, Profiles.DEV);
1919

2020
final ApplicationContext applicationContext =
2121
new AnnotationConfigApplicationContext(BeanProfilesDevConfig.class, BeanProfilesProdConfig.class);

0 commit comments

Comments
 (0)