欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

启动服务报错:If you want an embedded database please put a supported one on the classpath. If you have dat

程序员文章站 2022-04-19 22:33:24
...
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-11-19 10:10:57.271 ERROR [bootstrap,,,] 30460 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

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 (the profiles "localResource,healthCheck" are currently active).

翻译过来这样:

错误ApplicationContext开始。要显示自动配置报告,请在启用'debug'的情况下重新运行应用程序。
错误[bootstrap…]30460—[main] o.s.b.d。LoggingFailureAnalysisReporter:
* * * * * * * * * * * * * * * * * * * * * * * * * * *
应用程序启动失败
* * * * * * * * * * * * * * * * * * * * * * * * * * *
描述:
无法为数据库类型NONE确定嵌入式数据库驱动程序类
行动:
如果您想要嵌入式数据库,请在类路径中放置一个受支持的数据库。如果你需要从一个特定的配置文件中加载数据库设置,你可能需要**它(配置文件“localResource,healthCheck”当前是**的)。

解决方案之一:对应启动服务的pom加个这个

<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>runtime</scope>
		</dependency>