spring - Explicitly declaring service gateway in Java configuration -



spring - Explicitly declaring service gateway in Java configuration -

i have application using spring integration have multiple handlers (strategies) service gateway methods, , want deployment launcher able select specific handlers loaded. since component scanning pick of handlers indiscriminately, prefer explicitly declare javaconfig @beans them.

this works fine service objects themselves, can't find way load service interface in java without @integrationcomponentscan. current workaround include "one-liner" xml file <int-gateway> tag , @importresource it, i'd prefer more direct solution.

is there straightforward way in javaconfig tell spring integration create proxy service interface specific class?

gatewayproxyfactorybean you. class used populate bean definition <int:gateway> tag , messaginggateway annotation.

so, can this:

@bean public gatewayproxyfactorybean mygateway() { gatewayproxyfactorybean factorybean = new gatewayproxyfactorybean(yourserviceinterface.class); factorybean.setdefaultrequestchannel(gatewayrequestchannel()); homecoming factorybean; }

spring spring-integration spring-java-config

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -