无法在我的 jhipster 应用程序上加载其他配置文件

Cannot load other profile on my jhipster application

我将我的 jhipster 项目从 5.8.2 升级到 6.5.1,现在,我无法在 Heroku 上部署 (unable to deploy to heroku since jhipster update)

我以为是链接数据库的问题,突然我尝试以良好的配置文件启动我的应用程序

我的应用程序有 3 个配置文件 - 开发 - int(测试环境) -产品

如果我启动

./gradlew -Pint

 ./gradlew -Pprod

我有这个结果

The following profiles are active: prod
2019-12-26 11:53:38.867  WARN 16584 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'auditEventsEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/audit/AuditEventsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'auditEventsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customAuditEventRepository' defined in file [D:\workspace\yvidya\build\classes\java\main\fr\yoni\yvidya\repository\CustomAuditEventRepository.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistenceAuditEventRepository': Cannot create inner bean '(inner bean)#1a5b7394' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1a5b7394': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [fr/yoni/yvidya/config/LiquibaseConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [liquibase.integration.spring.SpringLiquibase]: Factory method 'liquibase' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2019-12-26 11:53:38.908 ERROR 16584 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 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).

在我的文件夹"resources/config"文件夹中,我有application-int.yml和application-prod.yml。那些文件在升级前没问题

在我的 build.gradle 中,我有 :

if (project.hasProperty("prod")) {
    apply from: "gradle/profile_prod.gradle"
} else if (project.hasProperty("int")) {
    apply from: "gradle/profile_int.gradle"
} else {
    apply from: "gradle/profile_dev.gradle"
}

gradle 存在每个环境的文件配置。

我的问题是什么?

我发现了我的错误

在我的属性数据库文件中:

jdbc:postgres://e

好的属性是:

jdbc:postgresql://e