Grails豆成春豆

时间:2014-01-17 20:47:23

标签: spring grails

我正在尝试将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>

这是正确的方法吗? 。谢谢你的帮助

0 个答案:

没有答案