如何将这部分代码由struts1改为struts2实现

2025年03月12日 20:24
有2个网友回答
网友(1):

public class ProductTypeAction extends ActionSupport{
private ProductType productType ;
@Resource(name="productTypeServiceBean")
private ProductTypeService productTypeService;

public String getProductTypeById() throws Exception {
productType = productTypeService.find(ProductType.class, 3);
return "SUCCESS";
}
}
struts.xml


/text.jsp

网友(2):


/WEB-INF/test.jsp