Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhongl/spring-boot-config-trap
https://github.com/zhongl/spring-boot-config-trap
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhongl/spring-boot-config-trap
- Owner: zhongl
- Created: 2016-08-26T06:48:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-26T07:02:39.000Z (over 8 years ago)
- Last Synced: 2024-11-05T10:57:20.294Z (about 2 months ago)
- Language: Java
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A demo for spring-boot configuration loading[^1].
> ## 24.3 Application property files
>
> SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment:
>
> 1. A /config subdirectory of the current directory.
> 1. The current directory
> 1. A classpath /config package
> 1. The classpath root
>
> The list is ordered by precedence (properties defined in locations higher in the list override those defined in lower locations).## Diff
```
> git diff config resources --
diff --git a/config/application.properties b/config/application.properties
index 8bb6cc1..e69de29 100644
--- a/config/application.properties
+++ b/config/application.properties
@@ -1 +0,0 @@
-trap.key=config
\ No newline at end of file```
## Run
1. `mvn clean spring-boot:run`
1. Click[^1]: http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files