java SpringBoot类路径maven依赖
我已经在我的^{
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
我正在使用mvn spring-boot:run
启动我的服务。我收到了这个错误信息:
Cannot load driver class: "org.postgresql.Driver"
我在generaed jar
文件中查看了BOOT-INF\lib\
我的application.yml
spring:
jpa:
generate-ddl: false
show-sql: true
properties:
hibernate:
format_sql: true
jdbc:
lob:
non_contextual_creation: true
liquibase:
enabled: false
profiles:
active: 'local'
还有我的application-local.properties
:
spring.datasource.url: "jdbc:postgresql://host:port/db"
spring.datasource.username: "username"
spring.datasource.password: "password"
spring.datasource.driverClassName: "org.postgresql.Driver"
共 (0) 个答案