ITeye博客

在struts的action中使用spring的IOC容器管理类

chenyubo · 2008-07-28 21:06 · Struts · Spring · Struts · XML · 配置管理 · IOC · Markdown

struts-config.xml 配置文件如下 xml 代码 [code="java"] [/code] 其中最关键的地方是 action 的 type="org.springframework.web.struts.DelegatingActionProxy" 必须设置为spring的代理 spring的配置文件如下 xml 代码 [code="java"] [/code] 注意: action 对应的类必须 设置name属性,而不是id ,这里的name必须和struts配置文件中action的path相同

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。