简体   繁体   中英

Initialize Flyway data source from persistence.xml

My application uses persistence.xml to store the DB connection parameters. How can I initialize Flyway?

Flyway doesn't support persistence.xml (as of 3.0).

Find a different way to store the DB config (eg, Spring property files) or parse the persistence.xml manually.

一种简单的方法是简单地读取XML,提取值并将它们传递给Flyway.setDataSource()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM