SQL Server 的SQL語句:
???ID???????????????????int??????????????????
???CreateTime???????????Timestamp????????
???FileAdd??????????????varchar(100)MyBatis配置:?<resultMap?type="instrrmentmodel"?id="instrrmentmodelMap">
????????<id?property="ID"?column="ID"/>
???????<result?property="CreateTime"?column="CreateTime"??javaType="java.sql.Timestamp"?jdbcType="TIMESTAMP"/>?
????????<result?property="FileAdd"?column="FileAdd"/>
????</resultMap>TInstrrmentModel實(shí)體類部分代碼:???? private? Integer??? ID? ;?????????????? ??? ?private?? Timestamp? CreateTime ;??????????? ???? private String?? FileAdd??? ;?public String? getCreateTime() {?? ??? ?return? new SimpleDateFormat("yyyy:MM:DD").format(CreateTime);?? ?}?? ?public void setCreateTime(Timestamp createTime) {?? ??? ??? ??? ?CreateTime = createTime;?? ?}無條件查結(jié)果:嚴(yán)重: Servlet.service() for servlet [MVC] in context with path [/EnterpriseEMS] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.? Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for sbzy.enterpriseems.model.domain.InstrrmentModel.selectList### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for sbzy.enterpriseems.model.domain.InstrrmentModel.selectList] with root causejava.lang.IllegalArgumentException: Mapped Statements collection does not contain value for sbzy.enterpriseems.model.domain.InstrrmentModel.selectList這個數(shù)據(jù)類型如何匹配呢!要命的很搞了半天
MyBatis日期類型 如何與SQLServer和java中的日期匹配的,
22不小了
2015-08-02 11:29:12