mybatis-3 icon indicating copy to clipboard operation
mybatis-3 copied to clipboard

Mybatis 3.5.7 BindingException

Open hitcp opened this issue 2 years ago • 3 comments

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>

hitcp avatar Aug 16 '22 14:08 hitcp

https://gitee.com/openframework/spring-examples/blob/master/spring-mybatis-examples/src/main/resources/mybatis-config.xml

hitcp avatar Aug 16 '22 14:08 hitcp

https://gitee.com/openframework/spring-examples/blob/master/spring-mybatis-examples/src/main/resources/mybatis-config.xml

end of file

hitcp avatar Aug 16 '22 14:08 hitcp

userMapper接口类中的SelectUser函数没有配置@select注解,同时在UserMapper.xml中也不存在select相应的标签

619123555 avatar Aug 31 '22 06:08 619123555

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.

harawata avatar Sep 27 '22 03:09 harawata