Java 如何使用类路径通过Liberty配置文件上的application.properties引用flyway.locations:

Java 如何使用类路径通过Liberty配置文件上的application.properties引用flyway.locations:,java,spring,spring-boot,websphere-liberty,flyway,Java,Spring,Spring Boot,Websphere Liberty,Flyway,我有一个SpringBoot应用程序在Liberty上运行,使用flyway并使用文件系统:在本地引用db/迁移文件。对于我们部署的环境,我希望将文件保存在生成的war中,而不是直接指定在服务器文件夹中。当我尝试使用classpath:db/migration时,我得到以下结果: 2017-06-21 13:50:20.494 INFO 2600 --- [ecutor-thread-3] o.f.core.internal.util.VersionPrinter : Flyway 4.

我有一个SpringBoot应用程序在Liberty上运行,使用flyway并使用文件系统:在本地引用db/迁移文件。对于我们部署的环境,我希望将文件保存在生成的war中,而不是直接指定在服务器文件夹中。当我尝试使用classpath:db/migration时,我得到以下结果:

2017-06-21 13:50:20.494  INFO 2600 --- [ecutor-thread-3] o.f.core.internal.util.VersionPrinter    : Flyway 4.2.0 by Boxfuse
2017-06-21 13:50:21.521  INFO 2600 --- [ecutor-thread-3] o.f.c.i.dbsupport.DbSupportFactory       : Database: jdbc:db2://devserver:12345/dev_database(DB2/AIX64 10.5)
2017-06-21 13:50:21.724  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration (ClassLoader: com.ibm.ws.classloading.internal.ThreadContextClassLoader@bdac658) On WebSphere an empty file named flyway.location must be present on the classpath location for WebSphere to find it!
2017-06-21 13:50:21.725  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration
2017-06-21 13:50:22.170  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration
2017-06-21 13:50:22.171  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration
2017-06-21 13:50:22.176  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration
2017-06-21 13:50:22.180  WARN 2600 --- [ecutor-thread-3] o.f.c.i.u.s.classpath.ClassPathScanner   : Unable to resolve location classpath:db/migration
2017-06-21 13:50:22.429  INFO 2600 --- [ecutor-thread-3] o.f.core.internal.command.DbValidate     : Successfully validated 2 migrations (execution time 00:00.334s)
2017-06-21 13:50:23.270  INFO 2600 --- [ecutor-thread-3] o.f.core.internal.command.DbMigrate      : Current version of schema "DEVSCHEMA": 2
2017-06-21 13:50:23.271  WARN 2600 --- [ecutor-thread-3] o.f.core.internal.command.DbMigrate      : Schema "DEVSCHEMA" has a version (2) that is newer than the latest available migration (1) !
2017-06-21 13:50:23.307  INFO 2600 --- [ecutor-thread-3] o.f.core.internal.command.DbMigrate      : Schema "DEVSCHEMA" is up to date. No migration necessary.
将应用程序连接到Liberty Profile上的my db/migration文件夹的正确方法是什么?我在Liberty文件夹里塞了一个空的Flyway.Location文件,但没有用


这是Liberty 17.0.0.1、Spring Boot 1.5.2和Flyway Core 4.2.0。

解决方案在日志中给出,您需要在db/Flyway中添加一个空文件Flyway.location