gpt4 book ai didi

maven - JHipster 和数据库连接

转载 作者:行者123 更新时间:2023-12-04 10:24:25 26 4
gpt4 key购买 nike

我正在使用 JHipster,当我运行时 sudo mvn liquibase:diff我收到以下错误

[INFO] Settings
----------------------------
[INFO] driver: org.postgresql.Driver
[INFO] url: jdbc:postgresql://localhost/gastos8
[INFO] username: gastos8
[INFO] password: *****
[INFO] use empty password: false
[INFO] properties file: null
[INFO] properties file will override? false
[INFO] prompt on non-local database? true
[INFO] clear checksums? false
[INFO] changeLogFile: src/main/resources/config/liquibase/master.xml
[INFO] context(s): null
[INFO] label(s): null
[INFO] referenceDriver: null
[INFO] referenceUrl: hibernate:spring:com.cboujon.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect
[INFO] referenceUsername: null
[INFO] referencePassword: null
[INFO] referenceDefaultSchema: null
[INFO] diffChangeLogFile: src/main/resources/config/liquibase/changelog/20150807132702_changelog.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.554s
[INFO] Finished at: Fri Aug 07 13:27:12 ART 2015
[INFO] Final Memory: 18M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:diff (default-cli) on project gastos8: Error setting up or running Liquibase: liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "gastos8" -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我不知道为什么 [INFO] username: gastos8 .

那是我的配置文件:

应用程序-dev.yml
spring:
profiles:
active: dev
datasource:
dataSourceClassName: org.postgresql.ds.PGSimpleDataSource
url:
databaseName: gastos8
serverName: localhost
username: postgres
password: ---

jpa:
database-platform: org.hibernate.dialect.PostgreSQL9Dialect
database: POSTGRESQL
openInView: false
show_sql: true
generate-ddl: false
hibernate:
ddl-auto: none
naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
properties:
hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: true
hibernate.cache.region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory

我究竟做错了什么?

最佳答案

Liquibase maven 插件不会读取 application.yml 来了解如何连接到您的数据库,它在您的 pom.xml 中有自己的配置。所以你必须把它放在那里。

你为什么用sudo执行maven?
现在,您可能拥有 root 拥有的项目文件,这通常是一个坏主意。

关于maven - JHipster 和数据库连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31883195/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com