java - spring integration and component scan -


i'm newbie spring mvc i've been moved new project uses spring integration turn in channel service. example in context.xml

<int:channel id="example-channel" />     <int:service-activator input-channel="example-channel" ref="exampleservicefacade" /> 

for every servicefacade have bind service channel.

i wandering, if map classes turned channels map beans component-scan?

<context:component-scan base-package="com.package" /> 

so ended this tutorial speaks annotation:

@integrationcomponentscan

but cannot understand how it's related xml tag service activator , channel.. i'm quite confused. more experience have idea if i'm trying can done?

i want scan con classes defines channels in integration without having declare every class.

thanks.

your question bit unclear. spring integration custom xml tag parsed infrastructure , registered beans in application context. you'd via raw <bean>.

@componentscan, @configuration, @bean , on marker annotations application context classes treat beans.

so, using both techniques application context configuration don't lose , can continue mark class @service , use bean name <service-activator ref="">.

from other side can build spring integration without xml! please, read mentioned doc in entirety.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -