mybatis-3
mybatis-3 copied to clipboard
Mybatis 3.5.7 BindingException
Mybatis Version:3.5.7
<mappers>
<!-- this setting it's ok -->
<mapper resource="mapper/UserMapper.xml"/>
<!-- these setting is's thorw BindingException :org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.atguigu.mybatis.mapper.UserMapper.SelectUser -->
<!--<package name="com.example.mapper"/>-->
<!--<package name="com.example.mapper.UserMapper"/>-->
</mappers>
https://gitee.com/openframework/spring-examples/blob/master/spring-mybatis-examples/src/main/resources/mybatis-config.xml
https://gitee.com/openframework/spring-examples/blob/master/spring-mybatis-examples/src/main/resources/mybatis-config.xml
end of file
userMapper接口类中的SelectUser函数没有配置@select注解,同时在UserMapper.xml中也不存在select相应的标签
Please read the mybatis-spring documentation : https://mybatis.org/spring/getting-started.html Starting from a skeleton project like this one and making small changes also is a good strategy.
[EDIT] I'll close this as it does not seem like a bug.