We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RT: 为什么会报这个警告?但是不影响使用! debug 如下: 这是第一次的: 这是第二次的:
The text was updated successfully, but these errors were encountered:
强迫症,也在看这个问题。 入口应该是在 tk.mybatis.mapper.autoconfigure.MapperAutoConfiguration 或org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration
tk.mybatis.mapper.autoconfigure.MapperAutoConfiguration
org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration
如果没有MapperFactoryBean实例,则从根路径扫描@Mapper注解类 在Application类上已经使用了tk的@MapperScan注解,启动信息显示没有找到MapperFactoryBean实例,但debug发现已经扫描到了Mapper,这就让我很费解了。 至于两次warn是因为Pagehelper依赖mybatis-spring-boot-starter
MapperFactoryBean
Application
tk
@MapperScan
warn
Pagehelper
mybatis-spring-boot-starter
Sorry, something went wrong.
如果集成了mapper-spring-boot-starter和pagehelper-spring-boot-starter 就屏蔽掉Mybatis中的自动配置,减少一次扫描@Mapper。 @SpringBootApplication(exclude = MybatisAutoConfiguration.class) 剩下的一次WARN忽略掉吧,为了兼容@Mapper注解,这里做个开关会比较好。
mapper-spring-boot-starter
pagehelper-spring-boot-starter
Mybatis
@Mapper
@SpringBootApplication(exclude = MybatisAutoConfiguration.class)
WARN
No branches or pull requests
RT: 为什么会报这个警告?但是不影响使用!
debug 如下:
这是第一次的:
这是第二次的:
The text was updated successfully, but these errors were encountered: