Hi. Is it possible to use expression language as an init-method value?
causes:Code:<bean id="foo" class="Foo" init-method="#{myExpression}"/>
The same works fine when used as a value for a property. Am I doing something wrong or it is a known limitation?Code:BeanDefinitionValidationException: Couldn't find an init method named '#{myExpression}' on bean with name 'foo'
In case it really doesn't work, I need to determine a method to call in Flyway (migrate, validate, etc.) when context is created, which should be configured based on a value in properties file. The mapping is not 1-to-1, so I wanted to create a class which takes a property value, do transformation and give proper method name which is later read using EL: #{myCalculatingBean.methodName} and used as an init-method value. Can it be done in some other way?
Thanks
Marcin


Reply With Quote
