The only way I worked was:
<osgi:reference id="basicAuthSecurityHandler" interface="com.groupgti.handler.authentication.basic.Handler"/> <bean id="securityHandler" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject" ref="basicAuthSecurityHandler"/> <property name="targetMethod" value="getSecurityHandler"/> <property name="arguments"> <list> <value type="java.lang.String">${com.groupgti.esb.targetjobs.indeed.userRealm}</value> </list> </property> </bean>
I had to use MethodInvokingFactoryBean . I tried using constructor-arg , but then I got an exception that there is no such constructor. Using MethodInvokingFactoryBean everything works fine.
source share