is there a way to dynamic include a bean in spring? -


i have scheduling process in spring run every 5 mins. more interesting upgrade make switch choose schedule process or web service. sure can make work properties setting , java, there few beans defined in application context have take care of

<bean class="org.springframework.scheduling.quartz.schedulerfactorybean">     <property name="triggers">         <list>             <!-- keep a,b,c,e -->             <ref bean="triggera" />             <ref bean="triggerb" />             <ref bean="triggerc" />             <!-- sort of condition enable ref or not -->             <ref bean="triggerd_i_want_an_option_to_disable_ahhhhhhhhhh" enabled="false"/>             <ref bean="triggere" />         </list>     </property> </bean> 

i know fantasy have such switch spring bean collections, please let me know if there way can make bean turn on / off properties file, like

  <bean enable="${thisbeaneabled}" id="..." class="com.chrstimas.all.gifts.are.free"  /> 

you need let triggerd_i_want_an_option_to_disable_ahhhhhhhhhh implments smartlifecycle, add boolean field, autowired property, value of field returned isautostartup()


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -