版权声明:★Study hard and make progress every day.☺★ https://blog.csdn.net/qq_38225558/article/details/86572784
在springboot项目中连接数据库时 如下图所示 - 报:Failed to determine a suitable driver class
解决方法:
启动类 加上 注解 : @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
如下:
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}) //exclude:做连接数据库使用 无则报:Failed to determine a suitable driver class
public class BlogApplication {
public static void main(String[] args) {
SpringApplication.run(BlogApplication.class, args);
}
}
最后成功解决: