Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 应用程序yml中的spring boot 2和liquibase:config被忽略_Java_Spring Boot_Liquibase - Fatal编程技术网

Java 应用程序yml中的spring boot 2和liquibase:config被忽略

Java 应用程序yml中的spring boot 2和liquibase:config被忽略,java,spring-boot,liquibase,Java,Spring Boot,Liquibase,我尝试将一个应用程序从spring-boot1迁移到spring-Boot2,但我在spring-boot部分遇到了很多困难: 我有这个日志: 上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.boot.autoconfigure.liquibase.liquibseautoconfiguration$liquibseconfiguration”

我尝试将一个应用程序从spring-boot1迁移到spring-Boot2,但我在spring-boot部分遇到了很多困难:

我有这个日志:

上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.boot.autoconfigure.liquibase.liquibseautoconfiguration$liquibseconfiguration”的bean时出错:调用init方法失败;嵌套异常为java.lang.IllegalStateException:找不到更改日志位置:类路径资源[db/changelog/db.changelog master.yaml](请添加更改日志或检查Liquibase配置)

使用此yaml:

spring:
  application:
    name: xxx
  jpa:
    generate-ddl: false
  liquibase:
      change-log: "classpath:/liquibase/xxx-db/db.changelog.json"

  datasource:
    platform: oracle
liquibase和spring boot 2似乎忽略了我的应用程序的liquibase部分 有什么想法吗

我的pom:

    <spring-boot.version>2.0.3.RELEASE</spring-boot.version>
    <spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
    <liquibase.version>3.4.2</liquibase.version>
2.0.3.0版本
芬奇利,释放
3.4.2
因此,我发现:

我用的是:

spring.config.location=other.yml

whiche在springboot1中工作,但在springboot2中不再工作

在从spring boot 1迁移到spring boot 2的过程中,参数spring.config.location(类application.yml文件所在的位置)的行为发生了变化。(来源:)

在springboot1中,spring.config.location=other.yml添加到默认文件application.yml other.yml文件中

在springboot2中,spring.config.location将默认的application.yml文件替换为另一个.yml文件

要更正,我需要执行以下操作:

spring.config.location=application.yml,other.yml

因此,我发现:

我用的是:

spring.config.location=other.yml

whiche在springboot1中工作,但在springboot2中不再工作

在从spring boot 1迁移到spring boot 2的过程中,参数spring.config.location(类application.yml文件所在的位置)的行为发生了变化。(来源:)

在springboot1中,spring.config.location=other.yml添加到默认文件application.yml other.yml文件中

在springboot2中,spring.config.location将默认的application.yml文件替换为另一个.yml文件

要更正,我需要执行以下操作:

spring.config.location=application.yml,other.yml


我从来没有在yml属性周围加过引号。你这样做有什么原因吗?我不认为液态碱属性应该在spring中,我也会检查tabs。没有,但是有没有结果都是相同的,没有双引号,对于spring boot 2。保留spring.liquibase.change-logI,试试看,它不起作用。liquibase似乎完全忽略应用程序。yml从来没有在yml属性周围加引号。你这样做有什么原因吗?我不认为液态碱属性应该在spring中,我也会检查tabs。没有,但是有没有结果是相同的,没有双引号,对于spring boot 2。保留spring.liquibase.change-logI没有ry,它不起作用。Liquibase似乎完全忽略了application.yml