一. 启动springboot报错:找不到或无法加载主类

  解决:直接选中项目,在ecplise选中"project",点击clean 清理项目再运行 问题解决。

二.报错:Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and no embedded datasource could be auto-configured.

 解决:因为添加了springboot整合mybatis的jar包,连接mysql的jar包,但是没有配置响应的数据源导致该报错

    1. 配置可用的数据源

    2. 在启动类的@EnableAutoConfiguration或@SpringBootApplication中添加exclude= {DataSourceAutoConfiguration.class},排除此类的autoconfig。启动以后就可以正常运行。

 

相关文章:

  • 2022-01-13
  • 2021-06-13
  • 2021-12-17
  • 2022-01-10
  • 2021-09-20
  • 2021-06-11
  • 2021-10-07
  • 2021-04-09
猜你喜欢
  • 2022-01-05
  • 2021-11-10
  • 2021-09-04
  • 2021-05-24
  • 2021-05-30
  • 2021-11-13
相关资源
相似解决方案