用ssh全注解时,在@Action中@Result注解报错
importjavax.annotation.Resource;importorg.apache.struts2.convention.annotation.Action...
import javax.annotation.Resource;import org.apache.struts2.convention.annotation.Action;import org.apache.struts2.convention.annotation.Namespace;import org.apache.struts2.convention.annotation.ParentPackage;import org.springframework.context.annotation.Scope;import org.springframework.stereotype.Controller;import com.biz.ICrmBiz;import com.opensymphony.xwork2.ActionSupport;import com.opensymphony.xwork2.ModelDriven;import com.pojo.SysUser;@SuppressWarnings("serial")@Controller@Namespace("/")@ParentPackage("struts-default")@Scope("prototype")public class CrmAction extends ActionSupport implements ModelDriven<Object>{ private ICrmBiz ermBiz; @Action(value="/querySysUserById",results={@Result(name="success",location="/left.jsp")}) public String querySysUserById() { SysUser sysUser=null; sysUser=ermBiz.querySysUserById(1); return SUCCESS; }
展开
1个回答
2015-10-04
展开全部
CTRL+SHIFT+O import 。。。。。。。。。 如果import了还是不正确,试试clcean。。。。。。。如果clean后,还是不正确,那项目的引用.jar不正确了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询