在使用springboot的时候,发现项目引入了SpringBoot集成mybatis框架的依赖,就必须要配置数据库连接信息,否则启动就会报错,错误如下:
DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
因为添加了数据库的组件,autoconfig会去读取数据源配置,而我没有配置数据源,就抛异常了,解决方法:不引入相关pom我这里是mybatis相关jar,注释掉,启动正常,或者在启动类上面添加注解:
DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
排除自定注入DataSource相关配置文件的自动装配即可.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-09-21
  • 2021-06-15
猜你喜欢
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-05-21
  • 2022-02-24
相关资源
相似解决方案