i'm using mybatis in my app. I'm using bind tag in my select element. This is my mapper code:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="myapp.model.MyDAO">
<select id="mySelect" parameterType="myapp.model.MyParameterBean" resultType="hashmap">
<bind name="SL" value="_parameter.getSelectList()" />
<bind name="TNS" value="_parameter.getTableNameSuffix()" />
SELECT NAME
#{SL}
FROM MYTABLE_#{TNS}
</select>
</mapper>
When i try to compile my app, i get a SAXParseException. Detailed error message is:
Failed to parse mapping resource: 'file [C:\myapp\model\myMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: Element type "bind" must be declared. Have you any idea about this bahaviour?
I'm using spring-mvc. For spring-mybatis integration I included mybatis-spring-1.1.0.jar.
Hi to all!