MyEclipse — Maven+Spring+Struts+Hibernate 整合 [学习笔记-3]

引入Struts2

在pom.xml中加入jar包

<!-- struts2 -->
      <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-core</artifactId>
        <version>2.3.4.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-spring-plugin</artifactId>
        <version>2.3.4.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-convention-plugin</artifactId>
        <version>2.3.4.1</version>
    </dependency>

在resource中加入struts.xml

创建UserAction类,并添加注解

在Web.xml中加入Struts2配置

============Struts 加入完毕======================

 

 

项目编码UTF-8

posted @ 2015-05-27 15:44  遥远的守望  阅读(180)  评论(0编辑  收藏  举报