2007-10-14

Struts+spring+hibernate中 最重要配置的地方

关键字: Struts spring hibernate

struts-config.xml里面

 

写一个

<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">

  <set-property property="ContextConfigLocation" value="/WEB-INF/applicationContext.xml">

</plug-in>

 

<action-mappings>里面的 <action>的type="org.springframework.web.struts.DelegatingActionPorxy"

 

 

在applicationContext.xml中 把DAO注入到action中

<bean name="/user" class="com.you.XAction">

  <property name="dao" ref="DAO"></property>

</bean>

评论
发表评论

您还没有登录,请登录后发表评论