@Value

SpringBoot에서 @PropertySource 어노테이션을 이용하여 application.properties, config.properties와 같은 설정 파일들의 지정된 값들을 소스상에 읽어올 수 있습니다. @PropertySource의 괄호안에 설정값의 경로와 properties 명을 입력합니다. @SpringBootApplication @PropertySource("application.properties") public class testPropertiesApplication{ } application.properties의 값들을 확인합니다. #Postgresql Config spring.datasource.url=jdbc:postgresql://localhost:5432/testDB spr..
보노보노92
'@Value' 태그의 글 목록