Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- lsof
- Windows
- 단축키
- web.xml
- Quartz
- Windows 10
- IntelliJ
- JavaScript
- bash
- context
- Mac
- maVen
- GIT
- 네트워크
- tomcat
- Source
- netsh
- Eclipse
- vscode
- xargs
- resource
- import
- ssh
- profile
- plugin
- port
- VirtualBox
- 줄바꿈 문자
- grep
- find
Archives
- Today
- Total
develog
[spring] 앱에 파라미터 전달하기 본문
* OS Environment Variable
- OS 레벨
- export db_user=test
- System.getenv("key")
* VM Options
- JVM 레벨
- java -Ddb_user=test -jar app.jar
- System.getProperty("key")
* Program arguments
- APP 레벨
- java -jar app.jar --db_user=test
- @Value("${key}")
1. Program arguments (--key=value)
2. VM Options (-Dkey=value)
3. OS Environment Variables (KEY=value)
4. application.properties / application.yml
우선순위는 1 > 2 > 3 > 4
Comments