报错内容:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'infoShip'. It was either not specified and/or could not be found for the javaType (com.c503.position.domain.InfoShip) : jdbcType (null) combination.
Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'infoShip'. It was either not specified and/or could not be found for the javaType (com.c503.position.domain.InfoShip) : jdbcType (null) combination.] with root cause
java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'infoShip'. It was either not specified and/or could not be found for the javaType (com.c503.position.domain.InfoShip) : jdbcType (null) combination.
下面是 .xml文件里的
<resultMap id="BaseResultMap" type="com.c503.position.domain.InfoTerminalManagement" autoMapping="true">
<id column="id" property="id" />
<result column="terminal_id" property="terminalId" />
<result column="terminal_type" property="terminalType" />
<result column="ship_name" property="shipName" />
<result column="state" property="state" />
<!-- 一对一映射,封装InfoShip的内容-->
<association property="infoShip" javaType="com.c503.position.domain.InfoShip" autoMapping="true" >
<id column="id" property="id" />
<result column="ship_name" property="shipName" />
<result column="ship_id" property="shipId" />
<result column="ship_type" property="shipType" />
<result column="owner_name" property="ownerName" />
<result column="owner_tel" property="ownerTel" />
<result column="ship_length" property="shipLength" />
<result column="ship_width" property="shipWidth" />
<result column="ship_depth" property="shipDepth" />
<result column="material" property="material" />
<result column="power" property="power" />
<result column="ship_picture" property="shipPicture" />
</association>
</resultMap>