1. 程式人生 > >一個小錯誤費我半天時間

一個小錯誤費我半天時間

spring+mybatis,啟動時,停止在

2015-09-09 10:40:22.627:INFO:oejs.Server:jetty-8.1.14.v20131031
2015-09-09 10:40:22.878:INFO:/:No Spring WebApplicationInitializer types detected on classpath
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
2015-09-09 10:40:23.157:INFO:/:Initializing Spring root WebApplicationContext
[0909 10:40:24 103 INFO ] [main] druid.pool.DruidDataSource - {dataSource-1} inited

查了很長時間原因,最後發現,原來是XML檔案有誤

        <result property="createDate" column="create_date" jdbcType="Date"/>
        <result property="modifyDate" column="modify_date" jdbcType="Date"/>

改正後:

        <result property="createDate" column="create_date" jdbcType="DATE"/>
        <result property="modifyDate" column="modify_date" jdbcType="DATE"/>

執行正常了。