I just want to create a singleton bean and have defined a public static method getInstance for it. I am able to create a bean by defining the corresponding defintion in XML config file, but what if I wish to use annotation based defintion?
I could not locate any alternative to defining the factory-method (which incidentally takes a string argument)
This works fine!Code:<bean id="configReader " class="com.me.ReadConfig" scope="singleton" factory-method="getConfiguration"> <constructor-arg value="${index.config}" /> </bean>
But, when I define
@Autowired
public static getConfiguration(String info)
It fails, any-one has any ideas?


Reply With Quote
