Last updated by admin 3 years ago
Spring????????? {excerpt:hidden=true}Spring Integration {excerpt}
{excerpt:hidden=true} Beans can be configured to auto-wiring into Grails components by adding entries into the "%PROJECT_HOME%springresources.xml" file of your Grails application. Controllers by default use auto-wiring by name so a bean defined as follows{excerpt} Grails?????????"%PROJECT_HOME%springresources.xml"??????????????? Grails????????????Beans?auto-wiring(?bean??????????????????????????????) ???????????????????????????????????auto-wiring??????????bean?????????????<bean id="myBean" class="MyBeanImpl"></bean>
class SomeController { def myBean
//.....
}class SomeService {
MyBean myBean def serviceMethod() {
myBean.invoke()
}
}


