-
생성자와 @ValueBack/Spring 2020. 7. 16. 16:28
#
@Value 로 파일 위치값 받아오고, Service 생성자단에서 파일 생성하고자 함
##
@Value 값이 null이 들어옴. -> Spring는 생성자를 호출해 인스턴스화 후 properties를 주입함
###
1) @PostConstruct 에서 file를 생성한다
2) @Value를 생성자 인자값으로 받는다. Customer(@Value("${soapGWEndpoint}") String soapGWEndpoint)
'Back > Spring' 카테고리의 다른 글
[warn] The type RepositoryRestConfigurerAdapter is deprecated (0) 2020.03.04 [Spring] Context (0) 2020.02.08