Merge pull request #10320 from rozagerardo/rozagerardo/JAVA-3715_Update-articles-for-2.4.0--spring-boot-properties

[JAVA-3715] Update articles for 2.4.0 -- spring-boot-properties
This commit is contained in:
Loredana Crusoveanu 2020-12-21 11:41:38 +02:00 committed by GitHub
commit 55fd576616
2 changed files with 10 additions and 4 deletions

View File

@ -15,7 +15,7 @@ public class ReloadablePropertySource extends PropertySource {
} }
public ReloadablePropertySource(String name, String path) { public ReloadablePropertySource(String name, String path) {
super(StringUtils.isEmpty(name) ? path : name); super(StringUtils.hasText(name) ? path : name);
try { try {
this.propertiesConfiguration = new PropertiesConfiguration(path); this.propertiesConfiguration = new PropertiesConfiguration(path);
FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy(); FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();

View File

@ -6,7 +6,9 @@ spring:
--- ---
spring: spring:
profiles: test config:
activate:
on-profile: test
name: test-YAML name: test-YAML
environment: testing environment: testing
enabled: false enabled: false
@ -37,7 +39,9 @@ component:
--- ---
spring: spring:
profiles: prod config:
activate:
on-profile: prod
name: prod-YAML name: prod-YAML
environment: production environment: production
enabled: true enabled: true
@ -48,7 +52,9 @@ servers:
--- ---
spring: spring:
profiles: dev config:
activate:
on-profile: dev
name: ${DEV_NAME:dev-YAML} name: ${DEV_NAME:dev-YAML}
environment: development environment: development
enabled: true enabled: true