0
我有一個SpringBoot應用程序在Liberty上運行,使用flyway並使用文件系統:在本地引用db/migration文件。對於我們的部署環境,我會寧願將文件保留在生成的戰爭中,而不是在服務器文件夾中並直接指定。當我嘗試使用類路徑:DB /遷移我得到以下幾點:如何使用classpath通過Liberty Profile上的application.properties引用flyway.locations:
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: [email protected]8) 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.
什麼是應用程序連接到自由女神簡介我的數據庫/文件夾遷移的正確方法?我用空的Flyway.Location文件遍佈我的Liberty文件夾,無濟於事。
這是Liberty 17.0.0.1,Spring-Boot 1.5.2和Flyway-Core 4.2.0。