struts2被很多新手诟病的一个地方在于“配置过于复杂”,相信不少初学者因为这个直接改投Spring-MVC了。convention-plugin、 config-browser-plugin这二个插件的出现,很大程度改善了这个囧境。

简言之:convention-plugin采用"约定大于配置”的思想,只要我们遵守约定,完全可以少写配置甚至不写配置;而config-browser-plugin则用于方便的浏览项目中的所有action及其与jsp view的映射。这二个插件结合起来学习,能很方便的搞定struts2中各种复杂的action-view映射需求。

一、config-browser-plugin使用

1 <dependency>
2     <groupId>org.apache.struts</groupId>
3     <artifactId>struts2-config-browser-plugin</artifactId>
4     <version>2.3.16</version>
5 </dependency>
View Code

相关文章:

  • 2021-11-24
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2021-07-27
猜你喜欢
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案