build.gradle 에서 application.properties 값 사용하는 방법
이번 글에서는 build.gradle 파일에서 *.properties에 선언된 값을 가져올 수 있는 방법이 없을지 고민해보다가 찾은 방법을 공유하도록 하겠습니다. build.gradle 내에 아래와 같이 추가합니다. 방법1 def Properties properties = new Properties() InputStream inputStream = new FileInputStream(project.rootProject.file('src/main/resources/application.properties')) 방법2 def Properties properties = new Properties() Reader reader = new FileReader(project.rootProject.file('src/m..
Server
2022. 10. 7. 20:24
공지사항