|
|
1
2
从Struts 1 ActionForm类中,您将需要:
|
|
|
2
2
你用的是Struts1还是Struts2? 如果您使用struts 1,那么有两种方法可以做到这一点。我更喜欢使用org.springframework.web.struts.delegatingactionproxy。在类路径中需要有spring-webmvc-struts.jar。 struts-config.xml:
applicationContext.xml:
我发现这种技术是最优雅的,它不会影响不使用spring的旧代码。 至少还有两种将Struts1与Spring集成的方法。ibm developerworks上有一篇文章解释了不同解决方案的利弊,google“用spring更好地处理struts操作”(像我这样的新手不允许包含链接)。 |
|
|
3
1
通常,您会将spring contextloader侦听器添加到web xml中。
然后添加
到struts.xml。 在你的动作课上,你可以说:
这就是Struts2的全部功能。 |
|
|
Michel · 在Android上后台播放音频超过一分钟 4 年前 |
|
|
category · 在服务中处理较长的Pod响应时间 8 年前 |
|
|
theDoron1 · C#服务未将文件移动到正确的文件夹 8 年前 |
|
|
XpressGeek · 应用程序被终止时广播接收器未调用服务 8 年前 |
|
|
anakin59490 · 角度5-组件和服务之间的通信 8 年前 |