简体   繁体   English

如何解决此问题 - 无法在 org.postgresql:postgresql:jar:42.2.4 收集依赖项

[英]How to resolve this - Failed to collect dependencies at org.postgresql:postgresql:jar:42.2.4

Could not resolve dependencies for project com.howtodoinjava:demo:jar:0.0.1-SNAPSHOT: 
Failed to collect dependencies at org.postgresql:postgresql:jar:42.2.4: Failed to read artifact descriptor for org.postgresql:postgresql:jar:42.2.4: Could not transfer artifact org.postgresql:postgresql:pom:42.2.4 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/postgresql/postgresql/42.2.4/postgresql-42.2.4.pom: Unknown host No such host is known (repo.maven.apache.org) -> [Help 1]

Share your pom.xml and application.properties , anyway it should be something like:分享你的pom.xmlapplication.properties ,无论如何它应该是这样的:

  • Pom file Pom 文件

<dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
</dependency>
  • Application peroperies应用程序
spring.datasource.url=jdbc:postgresql://localhost:5432/yourdatabasename
spring.datasource.username=postgres (this is default username)
spring.datasource.password=yourpassword

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

spring.jpa.hibernate.ddl-auto=update

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JBAS010441:无法为驱动程序加载模块 [org.postgresql] - JBAS010441: Failed to load module for driver [org.postgresql] 无法解析项目的依赖关系:未能在 net.sourceforge:kabeja:jar:0.4 收集依赖关系 - Could not resolve dependencies for project: Failed to collect dependencies at net.sourceforge:kabeja:jar:0.4 无法在org.kie:kie-api:jar:6.4.0上收集依赖项。 - Failed to collect dependencies at org.kie:kie-api:jar:6.4.0.Final: Maven构建失败,无法在org.springframework:spring-core:jar:4.0.2.4.2上收集依赖项 - Maven Build Failure, Failed to collect dependencies at org.springframework:spring-core:jar:4.0.2.RELEASE 无法在 org.apache.maven.plugins:maven-dependency-plugin:jar:2.10 收集依赖项 - Failed to collect dependencies at org.apache.maven.plugins:maven-dependency-plugin:jar:2.10 无法在org.apache.ignite:ignite-hibernate_5.1:jar上收集依赖项 - Failed to collect dependencies at org.apache.ignite:ignite-hibernate_5.1:jar 如何解决org.postgresql.jdbc.PgConnection.createClob()尚未实现 - How to resolve org.postgresql.jdbc.PgConnection.createClob() is not yet implemented SPRING BOOT/无法在 org.springframework.boot:spring-boot-starter:jar:1.0.0.RC5 收集依赖项 - SPRING BOOT/ Failed to collect dependencies at org.springframework.boot:spring- boot-starter:jar:1.0.0.RC5 自动连接的依赖项注入失败; 嵌套异常是org.springframework.beans.factory.BeanCreationException如何解决它 - Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException How to resolve it 如何解决“方法 org.postgresql.jdbc.PgConnection.createBlob() 尚未实现” - How to resolve “Method org.postgresql.jdbc.PgConnection.createBlob() is not yet implemented”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM