springboot启动报错:Cannot determine embedded database driver class for database type NONE


springboot启动报错如下:

Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

这是因为springboot默认会启动一个嵌入的数据库驱动,但是需要配置,我的项目中不需要用到数据库,所以需要跳过数据库检查

在application类上添加

@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})

即可


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM