Skip to content

Commit 0de68cd

Browse files
authored
Replace custom implementation of default spring profile by standard (#894)
* remove custom default profile from Application.java * specify default profile in application.yml, because this is the standard, expected, way of doing things: https://docs.spring.io/spring-boot/reference/features/profiles.html
1 parent 2e55643 commit 0de68cd

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/org/fairdatateam/fairdatapoint/Application.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,7 @@
3939
@ConfigurationPropertiesScan("org.fairdatateam.fairdatapoint.config.*")
4040
public class Application {
4141

42-
private static final String PROFILES_PROPERTY = "spring.profiles.active";
43-
4442
public static void main(String[] args) {
45-
final String property = System.getProperties().getProperty(PROFILES_PROPERTY);
46-
if (property == null) {
47-
System.setProperty(PROFILES_PROPERTY, Profiles.PRODUCTION);
48-
}
4943
SpringApplication.run(Application.class, args);
5044
}
5145
}

src/main/resources/application.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ spring:
1515
pageable:
1616
default-page-size: 50
1717
qualifier-delimiter: _
18+
profiles:
19+
default: production
1820
task:
1921
execution:
2022
pool:

0 commit comments

Comments
 (0)