springboot启动报错Failed to configure a DataSource: 'url' attribute is not specified
程序员文章站
2022-12-29 09:14:00
Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to dete ......
description:
failed to configure a datasource: 'url' attribute is not specified and no embedded datasource could be configured.
reason: failed to determine a suitable driver class
action:
consider the following:
if you want an embedded database (h2, hsql or derby), please put it on the classpath.
if you have database settings to be loaded from a particular profile
you may need to activate it (no profiles are currently active).
process finished with exit code 1
原因: 配置的注解需要连接数据库,一个解决方式是添加
排除,代码如下:经测试,我的是需要去掉依赖
<dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-data-jpa</artifactid> </dependency>
手动删除它所生成的项目的jar包,重编译,然后就可以正常启动。
上一篇: 一个系统的
推荐阅读
-
springboot启动报错Failed to configure a DataSource: 'url' attribute is not specified
-
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
-
奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
-
SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe
-
springboot启动报错Failed to configure a DataSource: 'url' attribute is not specified
-
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
-
奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
-
SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe