问题描述
一.<tx:adviceid="smAdvice"transaction-manager="transactionManager"><tx:attributes><tx:methodname="save*"propagation="REQUIRED"/><tx:methodname="add*"propagation="REQUIRED"/><tx:methodname="delete*"propagation="REQUIRED"/><tx:methodname="update*"propagation="REQUIRED"/><tx:methodname="*"/></tx:attributes></tx:advice>这是别人的代码问下why又有save又有add?advice里面是service方法还是dao的方法?二.<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.1//EN""http://struts.apache.org/dtds/struts-2.1.dtd"><struts><constantname="struts.objectFactory"value="spring"/><constantname="struts.i18n.encoding"value="UTF-8"/><packagename="tcjc027"extends="struts-default"><interceptors><interceptorname="userInSession"class="cn.jbit.pb.tangcco.tcjc027.command.interceptor.UserInSessionInterceptor"></interceptor><interceptor-stackname="tcjc027Stack"><interceptor-refname="userInSession"></interceptor-ref><interceptor-refname="defaultStack"></interceptor-ref></interceptor-stack></interceptors><default-interceptor-refname="tcjc027Stack"></default-interceptor-ref><global-results><resultname="againIndex">index.jsp</result></global-results><actionname="loginAction"class="loginAction"><resultname="main">/WEB-INF/jsp/main/main.jsp</result><resultname="index">index.jsp</result><interceptor-refname="defaultStack"></interceptor-ref></action><actionname="mainAction"class="mainAction"><resultname="top">/WEB-INF/jsp/main/top.jsp</result><resultname="left">/WEB-INF/jsp/main/left.jsp</result><resultname="right">/WEB-INF/jsp/main/right.jsp</result></action><actionname="userAction"class="userAction"><resultname="list">/WEB-INF/jsp/user/listUser.jsp</result><resultname="add">/WEB-INF/jsp/user/addUser.jsp</result><resultname="detail">/WEB-INF/jsp/user/detailUser.jsp</result><resultname="update">/WEB-INF/jsp/user/updateUser.jsp</result><resultname="success"type="redirectAction">userAction!list.action</result></action><actionname="gradeAction"class="gradeAction"><resultname="list">/WEB-INF/jsp/grade/listGrade.jsp</result><resultname="add">/WEB-INF/jsp/grade/addGrade.jsp</result><resultname="detail">/WEB-INF/jsp/grade/detailGrade.jsp</result><resultname="update">/WEB-INF/jsp/grade/updateGrade.jsp</result><resultname="success"type="redirectAction">gradeAction!list.action</result></action><actionname="studentAction"class="studentAction"><resultname="list">/WEB-INF/jsp/student/listStudent.jsp</result><resultname="add">/WEB-INF/jsp/student/addStudent.jsp</result><resultname="detail">/WEB-INF/jsp/student/detailStudent.jsp</result><resultname="update">/WEB-INF/jsp/student/updateStudent.jsp</result><resultname="success"type="redirectAction">studentAction!list.action</result></action></package></struts>然后action继承sessionaware这里struts头拦截器是干什么还有gradeAction!list.action是什么为什么不用actionsupport
解决方案
解决方案二:
楼主还是整理下帖子重发吧格式都没看得累