当前位置:首页 > 基于Maven的Spring - + - Spring - MVC - + - Mybatis的环境搭建
数据插入成功,至此,我们的项目搭建完整的完成了!!!如有错别字,请原谅,因为打字太痛苦啦!!谢谢大家!!
15. 检查一下我们的日志信息: [DEBUG] 2012-08-13 18:10:34
ispatcherServlet with name 'dispatcher' determining Last-Modified value for
[DEBUG] 2012-08-13 18:10:34 :Mapping [/result.do] to handler 'com.comverse.timesheet.web.controller.Resu[DEBUG] 2012-08-13 18:10:34 :Last-Modified value for [/Test/result.do] is: -1 [DEBUG] 2012-08-13 18:10:34
[DEBUG] 2012-08-13 18:10:34 :Invoking request handler method: public java.lang.String throws java.lang.Exception
$$$$$$$$$$$$$$$$$$$$$you want to check the result.jsp+++++++++++++ $$$$$$$$$$$$$$$$$$$$$ ready to insert +++++++++++++ PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-java.lang.Exception Driver] for JDBC transaction JDBC Driver] to manual commit
[DEBUG] 2012-08-13 18:10:34 :Creating a new SqlSession
[DEBUG] 2012-08-13 18:10:34 :Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@177e6b4] Driver] will be managed by Spring [DEBUG] 2012-08-13 18:10:34 JDBC Driver]
[DEBUG] 2012-08-13 18:10:34 :==> Preparing: INSERT INTO testtable (NAME,DATE) VALUES(?,?)
ispatcherServlet with name 'dispatcher' processing GET request for [/Test/r
com.comverse.timesheet.web.controller.ResultController.viewUser(javax.servlet.http.HttpServletRequest,org.s
[DEBUG] 2012-08-13 18:10:34 :Creating new transaction with name [com.comverse.timesheet.web.business.
[DEBUG] 2012-08-13 18:10:34 :Acquired Connection [jdbc:mysql://localhost:3306/timesheet, UserName=roo
[DEBUG] 2012-08-13 18:10:34 :Switching JDBC Connection [jdbc:mysql://localhost:3306/timesheet, UserNam
[DEBUG] 2012-08-13 18:10:34 :JDBC Connection [jdbc:mysql://localhost:3306/timesheet, UserName=root@l
oo Using Connection [jdbc:mysql://localhost:3306/timesheet, UserName=r
[DEBUG] 2012-08-13 18:10:34 :==> Parameters: yuanmomo6(String), 2012-08-13 18:10:34.122(Timestam[DEBUG] 2012-08-13 18:10:34 :Initiating transaction commit
[DEBUG] 2012-08-13 18:10:34 :Releasing transactional SqlSession [org.apache.ibatis.session.defaults.Default
[DEBUG] 2012-08-13 18:10:34 :Committing JDBC transaction on Connection [jdbc:mysql://localhost:3306/tim
UserName=root@localhost, MySQL-AB JDBC Driver]
[DEBUG] 2012-08-13 18:10:34 :Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@177e6b4]
[DEBUG] 2012-08-13 18:10:34 :Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@177e6b4] JDBC Driver] after transaction
[DEBUG] 2012-08-13 18:10:34 :Returning JDBC Connection to DataSource $$$$$$$$$$$$$$$$$$$$$ insert completed +++++++++++++
[DEBUG] 2012-08-13 18:10:34 :Invoking afterPropertiesSet() on bean with name 'result' [/WEB-INF/jsp/result.jsp]] in DispatcherServlet with name 'dispatcher' [DEBUG] 2012-08-13 18:10:34 :Successfully completed request
[DEBUG] 2012-08-13 18:10:34 :Returning cached instance of singleton bean 'sqlSessionFactory' 可以看出我们的事务也添加成功。
Spring MVC的流程:
request-->controller-->business-->implementation-->mysql
代码择日放到google code上,欢迎大家下载!! SVN:http://env-build.googlecode.com/svn/trunk/
Goole code URL: http://code.google.com/p/env-build/
转载请注明出处,谢谢: yuanmomo.net
[DEBUG] 2012-08-13 18:10:34 :Releasing JDBC Connection [jdbc:mysql://localhost:3306/timesheet, UserNam
[DEBUG] 2012-08-13 18:10:34 :Rendering view [org.springframework.web.servlet.view.JstlView: name 'result
[DEBUG] 2012-08-13 18:10:34 :Forwarding to resource [/WEB-INF/jsp/result.jsp] in InternalResourceView 're
共分享92篇相关文档