在jhipster-registry中使用Spring Config Server时出现问题

时间:2017-05-23 18:59:00

标签: jhipster spring-cloud-config

我使用JHipster创建了一个微服务架构。我使用的是jhipster-registry v2.8.0。我将'dev'配置文件重命名为'devdmi',因为我将拥有许多'dev'配置文件。它使用jhipster-registry和每个微服务的“dev,native”配置文件工作正常,包括它的application-devdmi.yml / boostrap-devdmi.yml文件。

我尝试将此配置转换为使用Git repo。我使用.yml文件构建了我的Git repo,但我不确定要使用的配置。目前我已经:

MyConfig/app1/MyApp1-devdmi.yml
MyConfig/app2/MyApp2-devdmi.yml

我也尝试过使用:

MyConfig/MyApp1-devdmi.yml
MyConfig/MyApp2-devdmi.yml

在MyApp1中,我将src / main / resources / config / application-devdmi.yml重命名为application-devdmi.yml.bak,希望它能从jhipster-registry中获取配置作为Spring Cloud Config Server。

在MyApp1中,我有一个bootstrap-devdmi.yml:

spring:
    application:
        name: my-app-1
    cloud:
        config:
            fail-fast: true
            uri: http://admin:${jhipster.registry.password}@my.host.com:8761/config
            name: MyApp1
            profile: devdmi 
            label: master 

jhipster-registry启动并显示它通过查看配置网页连接到Git仓库。

MyApps1无法启动并抛出有关Liquibase的错误,而不知道要连接到哪个数据库:

2017-05-23 13:09:52.669  WARN 60704 --- [           main]         o.s.boot.SpringApplication               : Error handling failed (Error    creating bean with name 'delegatingApplicationListener' defined in class   path resource [org/springframework/security/config/annotation    /web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor  before instantiation of bean failed; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating  bean with name 'org.springframework.transaction.config.internalTransactionAdvisor'  defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate    [org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]: Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException)
2017-05-23 13:09:52.683 ERROR 60704 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

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

Description:

Cannot determine embedded database driver class for database type NONE

有什么想法吗?

0 个答案:

没有答案