???????Struts2Spring?????Action??Service
???????????? ???????[ 2013/11/13 14:55:31 ] ????????
???????????????????????Struts2??Spring??Java?????????д??????????Struts2Spring?????Action??Service??
???????????д??????Web???????????????????????δ????????????????"???????Struts2??Action????????? "????????????????
???????????????????????????????д???????У??????????????????
?????????????????????????-?????
????1.????????
????http://blog.csdn.net/fansunion/article/details/12118043 ???????Struts2??Action?????????
????????????????????????? ???JUnit????????????? Struts2?????????Action??
?????????????Struts2??Spring??2??????????????
????????????????????Demo???£?????????????? ???????????????
????2.???????????????jar????
????Struts???jar??
????Spring???jar??
????JUnit?? spring-test-3.2.3.RELEASE.jar??struts2-junit-plugin-2.2.3.1.jar????????jar??
????Tomcat??Servlet/JSP jar??
????3.???Action??
package action;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
/**
* ???????Action??
* @author FansUnion
*
*/
@Controller
public class UserAction {
@Autowired
private UserService userService;
public String getName() {
userService.getName("FansUnion");
return "success";
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11