java.lang.NoClassDefFoundError: org/apache/ibatis/annotations/Mapper
程序员文章站
2022-05-24 12:00:36
...
报错:
使用@Select等注解,mapper层异常
java.lang.NoClassDefFoundError: org/apache/ibatis/annotations/Mapper
原因:
MyBatis对应maven依赖有误
解决方法:
依赖改为
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.5</version>
</dependency>
推荐阅读
-
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.sql.SQLException: The server time zone value 'Ö
-
【Bug解决】org.apache.ibatis.type.TypeException: The alias ‘xxxx‘ is already mapped to the value ‘xxx‘
-
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory,
-
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
-
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
-
错误:org.apache.ibatis.builder.BuilderException: Ambiguous collection type for property ‘children‘.
-
java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.Integer
-
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
-
Caused by: java.lang.NoSuchMethodError: org.apache.ibatis.session.Configuration.setVfsImpl(Ljava/lan
-
org.apache.ibatis.reflection.ReflectionException: Error instantiating class with invalid types