达仓
2016-06-08 21:56
这是控制台的日志,没问题:
DEBUG [org.apache.ibatis.transaction.jdbc.JdbcTransaction] - Opening JDBC Connection
DEBUG [org.apache.ibatis.transaction.jdbc.JdbcTransaction] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.Connection@1c0e2dd]
DEBUG [Message.deleteOne] - ==> Preparing: delete from message where ID = ?
DEBUG [Message.deleteOne] - ==> Parameters: 6(Integer)
DEBUG [Message.deleteOne] - <== Updates: 1
DEBUG [org.apache.ibatis.transaction.jdbc.JdbcTransaction] - Committing JDBC Connection [com.mysql.jdbc.Connection@1c0e2dd]
DEBUG [org.apache.ibatis.transaction.jdbc.JdbcTransaction] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.Connection@1c0e2dd]
DEBUG [org.apache.ibatis.transaction.jdbc.JdbcTransaction] - Closing JDBC Connection [com.mysql.jdbc.Connection@1c0e2dd]
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Rendering view [org.springframework.web.servlet.view.JstlView: name 'WEB-INF/jsp/back/messageList'; URL [/WEB-INF/jsp/back/messageList.jsp]] in DispatcherServlet with name 'springmvc09'
DEBUG [org.springframework.web.servlet.view.JstlView] - Forwarding to resource [/WEB-INF/jsp/back/messageList.jsp] in InternalResourceView 'WEB-INF/jsp/back/messageList'
DEBUG [org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
Controller.java
@Controller @RequestMapping("/weixin") public class WeixinController { @RequestMapping(value = "/messageDeleteOne") public String messageDeleteOne(HttpServletRequest request, Model model) { //接受页面传回的值 String id = request.getParameter("id"); MaintainService maintainService = new MaintainService(); maintainService.deleteOne(id); request.getRequestDispatcher("weixin/messageList.do"); return "WEB-INF/jsp/back/messageList"; } }
这是删除单条之后的记录,跳转不回来,特来请教
.forword()
使用重定向
通过自动回复机器人学Mybatis---基础版
107413 学习 · 786 问题
相似问题