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

报错失败原因引入了数据库驱动依赖,但是没有进行数据库配置。

在application.properties进行数据库配置

#spring.datasource.driver-class-name = com.mysql.jdbc.Driver
#spring.datasource.url = jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=utf8&useSSL=false
#spring.datasource.username = root
#spring.datasource.password = 123456
Logo

一站式 AI 云服务平台

更多推荐