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) {
super(StringUtils.isEmpty(name) ? path : name);
super(StringUtils.hasText(name) ? path : name);
try {
this.propertiesConfiguration = new PropertiesConfiguration(path);
FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();

View File

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