• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






天生自然

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2022年4月9日

解决:Could not autowire. No beans of 'XXXXXXXXXX' type found.
摘要: 针对于不能够正常编译运行的解决方案:正确的导入包,如果是检查错误提示中的类的包是否导入正确,这种错误最常见在mybatis中的mapper下,比如对于mybatis的的注解版或配置文件版的解决办法: ①.配置文件版:在全局配置文件中,配置要自动扫描进容器的包 <!-- mapper scanner 阅读全文
posted @ 2022-04-09 12:17 吴裕雄 阅读(218) 评论(0) 推荐(0)
 
解决:[classpath:db/migration] (please add migrations or check your Flyway configuration)
摘要: 在yml文件中(例如:application-dev.yml) spring: #spring启动时禁用flyway功能 flyway: enabled: false 这样在项目启动时就不会进行flyway的迁移了 阅读全文
posted @ 2022-04-09 11:47 吴裕雄 阅读(677) 评论(0) 推荐(0)
 
解决:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
摘要: yml或者properties文件没有被扫描到,需要在pom文件中<build></build>添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <resources> <resource> <director 阅读全文
posted @ 2022-04-09 11:29 吴裕雄 阅读(97) 评论(0) 推荐(0)