MyBatis 每次查询之后,项目都会reload。请问如何处理。

只是_曾经 2014-02-27 04:50:03
日志如下:


2014-02-27 16:40:10,229 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner] - Identified candidate component class: file [D:\ProgramFiles\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\B2B_Back\WEB-INF\classes\com\mapper\PolicyMapper.class]
2014-02-27 16:40:10,229 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner] - Creating MapperFactoryBean with name 'policyMapper' and 'com.mapper.PolicyMapper' mapperInterface
2014-02-27 16:40:10,290 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Property 'configLocation' not specified, using default MyBatis Configuration
2014-02-27 16:40:10,303 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Scanned package: 'com.pojo' for aliases
2014-02-27 16:40:10,303 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Registered plugin: 'com.pagePlugin.PagePlugin@bb4c22'
2014-02-27 16:40:10,394 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Property 'mapperLocations' was not specified or no matching resources found
2014-02-27 16:40:10,929 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionUtils] - Creating a new SqlSession
2014-02-27 16:40:10,944 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionUtils] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4c73b0]
2014-02-27 16:40:11,035 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.transaction.SpringManagedTransaction] - JDBC Connection [jdbc:mysql://192.168.1.223:3306/framework_v3?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@WIN7-20140219DC, MySQL-AB JDBC Driver] will be managed by Spring
2014-02-27 16:40:11,039 [http-bio-8080-exec-3] DEBUG [com.mapper.PolicyMapper.listPageGetPolicyRequest] - ooo Using Connection [jdbc:mysql://192.168.1.223:3306/framework_v3?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull, UserName=root@WIN7-20140219DC, MySQL-AB JDBC Driver]
2014-02-27 16:40:11,045 [http-bio-8080-exec-3] DEBUG [com.mapper.PolicyMapper.listPageGetPolicyRequest] - ==> Preparing: select count(0) from (SELECT po.id, po.airline_code, po.departure_exclude, po.arrival_exclude, po.need_switchPNR, po.expired_date, po.start_date, po.supply_officeNo, po.work_time, po.flight_course, po.commision_money, po.commision_point, po.seat_class, po.modifyFlag, po.flightNo_exclude, po.flightNo_including, po.flight_cycle,po.policy_source FROM policy po WHERE po.sync_time > (SELECT po1.sync_time FROM policy po1 WHERE po1.id = ?) and datediff(po.expired_date, po.start_date) > 1 ORDER BY po.sync_time) as tmp_count
2014-02-27 16:40:11,110 [http-bio-8080-exec-3] DEBUG [com.mapper.PolicyMapper.listPageGetPolicyRequest] - ==> Parameters: 4028805f43bddb560143bdddcf250020(String)
2014-02-27 16:40:21,217 [http-bio-8080-exec-3] DEBUG [com.mapper.PolicyMapper.listPageGetPolicyRequest] - ==> Preparing: SELECT po.id, po.airline_code, po.departure_exclude, po.arrival_exclude, po.need_switchPNR, po.expired_date, po.start_date, po.supply_officeNo, po.work_time, po.flight_course, po.commision_money, po.commision_point, po.seat_class, po.modifyFlag, po.flightNo_exclude, po.flightNo_including, po.flight_cycle,po.policy_source FROM policy po WHERE po.sync_time > (SELECT po1.sync_time FROM policy po1 WHERE po1.id = ?) and datediff(po.expired_date, po.start_date) > 1 ORDER BY po.sync_time limit 0,10
2014-02-27 16:40:21,218 [http-bio-8080-exec-3] DEBUG [com.mapper.PolicyMapper.listPageGetPolicyRequest] - ==> Parameters: 4028805f43bddb560143bdddcf250020(String)
2014-02-27 16:40:21,909 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4c73b0]
2014-02-27 16:40:21,910 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionUtils] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4c73b0]
2014-02-27 16:40:21,910 [http-bio-8080-exec-3] DEBUG [org.mybatis.spring.SqlSessionUtils] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4c73b0]
2014-2-27 16:40:29 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/Test] has started
2014-2-27 16:40:29 org.apache.catalina.core.ApplicationContext log
信息: Destroying Spring FrameworkServlet 'springMVC'
2014-2-27 16:40:29 org.apache.catalina.core.ApplicationContext log
信息: Shutting down log4j
2014-2-27 16:40:29 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2014-2-27 16:40:29 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/Test] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2014-2-27 16:40:29 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/Test] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak.
2014-2-27 16:40:30 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\ProgramFiles\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\B2B_Back\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
2014-2-27 16:40:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
2014-2-27 16:40:33 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
2014-2-27 16:40:33 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2014-2-27 16:40:36 org.apache.catalina.core.ApplicationContext log
信息: Set web app root system property: 'spring.webapp.root' = [D:\ProgramFiles\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\B2B_Back\]
2014-2-27 16:40:36 org.apache.catalina.core.ApplicationContext log
信息: Initializing log4j from [D:\ProgramFiles\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\B2B_Back\WEB-INF\log4j.properties]
2014-2-27 16:40:36 org.apache.catalina.core.StandardContext reload
信息: Reloading Context with name [/Test] is completed

...全文
317 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
长笛党希望 2014-02-27
  • 打赏
  • 举报
回复
引用 3 楼 shanxiuwei 的回复:
[quote=引用 1 楼 NNTT2010 的回复:] 没碰到过这种问题,楼主tomcat的版本是多少?
问题已经解决,因为查询后会写一次配置文件。所以tomcat会Reload.[/quote] 额。。。。
只是_曾经 2014-02-27
  • 打赏
  • 举报
回复
引用 1 楼 NNTT2010 的回复:
没碰到过这种问题,楼主tomcat的版本是多少?
问题已经解决,因为查询后会写一次配置文件。所以tomcat会Reload.
  • 打赏
  • 举报
回复
没有放在web.xml初始化?
长笛党希望 2014-02-27
  • 打赏
  • 举报
回复
没碰到过这种问题,楼主tomcat的版本是多少?

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧