简体   繁体   English

使用 spring boot 运行 struts 2 Web 应用程序

[英]Running struts 2 web application using spring boot

I see we can integrate struts 2 with spring 4. I am new to spring boot and I searched a lot to check if we can use struts 2 with spring boot but I did not find any clear answers.我看到我们可以将 struts 2 与 spring 4 集成。我是 spring boot 的新手,我搜索了很多来检查我们是否可以将 struts 2 与 spring boot 一起使用,但我没有找到任何明确的答案。 Is it possible to integrate struts 2 and spring boot?是否可以集成struts 2和spring boot?

Refer to this link .请参阅此 链接 It is a simple hello world example with all struts2+boot flavor.这是一个简单的 hello world 示例,具有所有 struts2+boot 风格。

With spring boot you can use spring MVC, which can also handle web requests. 通过spring boot,您可以使用spring MVC,它也可以处理Web请求。

Do you really need struts? 您真的需要撑杆吗? If yes you can integrate spring into struts. 如果是,则可以将spring集成到支杆中。 For examples you can take a look at https://github.com/apache/struts-examples/tree/master/spring-struts 例如,您可以看看https://github.com/apache/struts-examples/tree/master/spring-struts

With that integration you can use spring services etc. in struts actions. 通过这种集成,您可以在struts动作中使用spring服务等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM