We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a07132c commit e3eaac5Copy full SHA for e3eaac5
backend/E20250707 Spring application properties.md
@@ -0,0 +1,15 @@
1
+``` java
2
+public static void main(String[] args) {
3
+ var app = new SpringApplication(DeviceApplication.class);
4
+ var ctx = app.run(args);
5
+ printActiveProperties(ctx.getEnvironment());
6
+}
7
+
8
+private static void printActiveProperties(ConfigurableEnvironment env) {
9
+ System.out.println("************************* ACTIVE APP PROPERTIES ******************************");
10
+ env.getPropertySources().stream().filter(ps -> ps instanceof OriginTrackedMapPropertySource)
11
+ .map(ps -> ((OriginTrackedMapPropertySource) ps).getSource().entrySet())
12
+ .flatMap(it -> it.stream())
13
+ .forEach(property -> System.out.println(property.getKey() + "=" + property.getValue()));
14
15
+```
0 commit comments