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 |
29 | 30 |
Tags
- boj
- Vue.js
- Linked list
- CSV
- SWEA
- 구현
- SQL
- DFS
- programmers
- 코테
- Data Structure
- hash table
- gpdb
- BFS
- JavaScript
- GitHub
- Priority Queue
- 코딩테스트
- 시뮬레이션
- spring boot
- 알고리즘
- aws
- 알고리듬
- Back tracking
- Algorithm
- 모의SW역량테스트
- Bruth Force
- django
- Python
- Trie
Archives
- Today
- Total
목록Spring-Boot (1)
hotamul의 개발 이야기
[Spring-Boot] 환경 변수 저장 및 사용 방법
Spring Boot에서는 config 디렉토리에 환경 변수 파일을 저장할 수 있다. 기본적으로 Spring Boot는 아래 나열된 순서대로 환경 변수 파일을 찾는다. A config subdirectory of the current directory. The current directory. A classpath /config package. config 디렉토리에 .env 파일을 만들어 환경 변수들을 저장하고 DB_HOST=localhost DB_PORT=5432 DB_USER=admin DB_PASSWORD=secret 아래 처럼 @Value annotation로 해당 변수들을 사용하면 된다. @RestController public class MyController { @Value("${DB_HO..
Dev./Spring-Boot
2023. 2. 17. 23:56