我正在尝试执行一个SpringBoot项目,但是我在运行时遇到了这个问题:
***************************
APPLICATION FAILED TO START
***************************
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).
应用程序。属性:
spring.datasource.url=jdbc:postgresql://localhost:5432/aiko
spring.datasource.username=postgres
spring.datasource.password=123
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
聚合物.xml
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
我尝试了一些代码在论坛上阅读,但它没有工作
1条答案
按热度按时间xqk2d5yq1#
解决方法:
在pom.xml存档中