我正在尝试将grails bean转换为spring bean
Resources.groovy
beans = {
testLoggingUtils(com.test.logging.LoggingUtils)
{
bean -> bean.factoryMethod = "getInstance"
}
trackLogging(testLoggingUtils: "getLogProcessorInstance")
}
我已将上面的grails bean转换为
<bean id="testLoggingUtils" class="com.test.logging.LoggingUtils"
factory-method="getInstance"/>
<bean id="trackLogging" factory-bean="testLoggingUtils"
factory-method="getLogProcessorInstance"></bean>
这是正确的方法吗? 。谢谢你的帮助