Japanese Spring Integration

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>
{excerpt:hidden=true} can be injected into a Grails controller by specifing a corresponding property name:{excerpt} bean?id??????????????????????Grails????????????????????:
class SomeController {

def myBean //..... }

{excerpt:hidden=true} Grails service classes support injection by type or name, defaulting to type:{excerpt} Grails ?????????????????????(injection)????????:
class SomeService {
     MyBean myBean

def serviceMethod() { myBean.invoke() } }

{excerpt:hidden=true} Also JNDI DataSources can be set up with a bean id "dataSource". More details under Configuration page.{excerpt} ???JNDI???????????id "dataSource"????????????????