Configuration and @EnableIntegration
@EnableIntegration
@EnableIntegration
@EnableIntegration annotation์ ์ ํ๋ฆฌ์ผ์ด์ ์ปจํ ์คํธ์ ๋ง์ ์ธํ๋ผ ๊ตฌ์ฑ ์์๋ฅผ ๋ฑ๋กํฉ๋๋ค.
errorChannel
๋ฐ ํด๋นLoggingHandler
, pollers์ฉtaskScheduler
,jsonPath SpEL-function
, ๋ฑ๊ณผ ๊ฐ์ ์ผ๋ถ ๋ด์ฅ ๋น์ ๋ฑ๋กํฉ๋๋ค.์ ์ญ ๋ฐ ๊ธฐ๋ณธ ํตํฉ ํ๊ฒฝ์ ์ํ
BeanFactory
๋ฅผ ํฅ์์ํค๊ธฐ ์ํด ์ฌ๋ฌBeanFactoryPostProcessor
์ธ์คํด์ค๋ฅผ ์ถ๊ฐํฉ๋๋ค.์ฌ๋ฌ
BeanPostProcessor
์ธ์คํด์ค๋ฅผ ์ถ๊ฐํ์ฌ ํตํฉ ๋ชฉ์ ์ผ๋ก ํน์ ๋น์ ํฅ์ ๋๋ ๋ณํ ๋ฐ ๋ํํฉ๋๋ค.๋ฉ์์ง annotation์ ๊ตฌ๋ฌธ ๋ถ์ํ๊ธฐ ์ํด annotation ํ๋ก์ธ์๋ฅผ ์ถ๊ฐํ๊ณ ์์ฉ ํ๋ก๊ทธ๋จ ์ปจํ ์คํธ์ ๋ํ ๊ตฌ์ฑ ์์๋ฅผ ๋ฑ๋กํฉ๋๋ค.
@IntegrationComponentScan
@IntegrationComponentScan
Spring Integration๊ณผ ๊ด๋ จ๋ ๊ตฌ์ฑ ์์ ๋ฐ ์ฃผ์์ผ๋ก ์ ํํ์ฌ ์ค์บํ๋ค.(์: @MessagingGateway
)
@EnablePublisher
@EnablePublisher
@EnablePublisher
์ด๋
ธํ
์ด์
์ PublisherAnnotationBeanPostProcessor
๋น์ ๋ฑ๋กํ๊ณ ์ฑ๋ ์์ฑ ์์ด ์ ๊ณต๋๋ @Publisher
์ด๋
ธํ
์ด์
์ ๋ํด default-publisher-channel
์ ๊ตฌ์ฑํฉ๋๋ค
๋ ์ด์์ @EnablePublisher
์ฃผ์์ด ๋ฐ๊ฒฌ๋๋ฉด ๋ชจ๋ ๊ธฐ๋ณธ ์ฑ๋์ ๋ํด ๋์ผํ ๊ฐ์ ๊ฐ์ ธ์ผ ํฉ๋๋ค.
@GlobalChannelInterceptor
@GlobalChannelInterceptor
@GlobalChannelInterceptor
์ด๋
ธํ
์ด์
์ ๊ธ๋ก๋ฒ ์ฑ๋ ์ฐจ๋จ์ ์ํด ChannelInterceptor
๋น์ ํ์ํ๊ธฐ ์ํด ๋์
๋์์ต๋๋ค.
@GlobalChannelInterceptor
์ด๋
ธํ
์ด์
์ ํด๋์ค ๋ ๋ฒจ(@Component
์คํ
๋ ์คํ์
์ด๋
ธํ
์ด์
ํฌํจ) ๋๋ @Configuration
ํด๋์ค ๋ด์ @Bean
๋ฉ์๋์ ๋ฐฐ์น๋ ์ ์์ต๋๋ค. ๋ ๊ฒฝ์ฐ ๋ชจ๋ Bean์ ChannelInterceptor๋ฅผ ๊ตฌํํด์ผ ํฉ๋๋ค.
@IntegrationConverter
@IntegrationConverter
@IntegrationConverter
์ฃผ์์ converter
, GenericConverter
๋๋ ConverterFactory
๋น์ integrationConversionService
์ ํ๋ณด ๋ณํ๊ธฐ๋ก ํ์ํฉ๋๋ค.
Reference
Last updated
Was this helpful?