강의

멘토링

커뮤니티

Inflearn Community Q&A

wn89251719's profile image
wn89251719

asked

Practical web development using Java Spring Boot

How to manage and use properties required for Spring web development API integration

API 연동에 필요한 프로퍼티 관리와 사용방법에서 facebook.properties도 추가하려면 코드를 어떻게 작성해야 하나요?

Written on

·

236

0

안녕하세요.

API 연동에 필요한 프로퍼티 관리와 사용방법 강의에서 facebook.properties도 추가하려면 코드를 어떻게 작성해야 하나요?

아래와 같이 코드를 작성할 경우

@PropertySource의 마지막에 있는 facebook.properties가 KakaoProperties.class와 FacebookProperties.class 모두에 맵핑 되고 kakao.properties는 맵핑되지 않습니다.

어떤 식으로 코드를 작성해야 하나요?

@Configuration
@EnableConfigurationProperties(
        {KakaoProperties.class, FacebookProperties.class}
)
@PropertySources({
        @PropertySource("classpath:properties/kakao.properties"),
        @PropertySource("classpath:properties/facebook.properties")
})
public class PropertiesConfiguration {
}

 

spring-boot

Answer

This question is waiting for answers
Be the first to answer!
wn89251719's profile image
wn89251719

asked

Ask a question