一直找不到@Mapper注解,只有@Mapperscan。
解决方法:
<dependency
>
<groupId
>
org.mybatis
</groupId
>
<artifactId
>
mybatis
</artifactId
>
<version
>
3.4.5
</version
>
</dependency
>
<dependency
>
<groupId
>
org.mybatis
</groupId
>
<artifactId
>
mybatis-spring
</artifactId
>
<version
>
1.3.1
</version
>
</dependency
>
将pom.xml里面的替换成上面的
BUT我要说的不是这个问题
Description:
Field studentMapper in com.example.service.impl.StudentServiceImpl required a bean of type 'com.example.mapper.StudentMapper' that could not be found.
Action:
Consider defining a bean of type 'com.example.mapper.StudentMapper' in your configuration.
这个问题试过无数个方法不知道怎么解决,求解!!!!