Maven 实现Struts2注解配置步骤详解
1,pom.xml
package com.wiker.struts2;import org.apache.struts2.convention.annotation.Action;import org.apache.struts2.convention.annotation.Namespace;import org.apache.struts2.convention.annotation.ParentPackage;import org.apache.struts2.convention.annotation.Result;import org.apache.struts2.convention.annotation.Results;import com.opensymphony.xwork2.ActionSupport;@ParentPackage("struts-default") @Results( { @Result(name = "success", location = "/index.jsp"), @Result(name = "error", location = "/index.jsp") }) public class TestAction extends ActionSupport { private static final long serialVersionUID = 1L; @Action(value="test") public String mainDataSouse1Search() { System.out.println(333); return "success"; } }
附源码免积分下载:http://download.csdn.net/detail/yangwei19680827/6239247