Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration between subprojects Migrations (Runtime) and Spring Boot Autoconfigure #162

Closed
jmoraleda opened this issue Mar 1, 2020 · 6 comments

Comments

@jmoraleda
Copy link

We already use mybatis-spring-boot-autoconfigure and Mybatis in our project extensively and are very happy with it.

We currently use liquibase for schema migration, and are reasonably happy with it, but we are missing the flexibility of mybatis and are considering moving to Mybatis Migrations Runtime Schema Upgrade instead.

We have been unable to find any documentation on how to integrate the Migrations Runtime with Spring, including testing, in particular using Mybatis Spring Boot Autoconfigure. Can you point us in the right direction or even some examples?

We are aware of the project https://github.com/Bessonov/mybatis-migrations-spring-boot-autoconfigure and the discussion here #74 but those are three years old, so we are wondering if any work has been done since then. Thank you.

@harawata
Copy link
Member

harawata commented Mar 1, 2020

Hello @jmoraleda ,

Does this answer help?
https://stackoverflow.com/a/55873047

@jmoraleda
Copy link
Author

Hello @harawata Thank you very much for your super quick response! I just tested your sample project with our database and it works beautifully. This fully answers my question. Thank you for a great project!

@jmoraleda
Copy link
Author

jmoraleda commented Mar 2, 2020

Hello @harawata. Inspired by your post and the autoconfigure project mentioned above I have created the attached project that is fully operational and integrates mybatis migrations into a spring boot project. One can specify in application.yaml multiple java packages and/or resource folders in the jar/war containing the sql scripts.

It depends on our own parent pom, so you won't be able to compile it directly, but you should not have any problem with it as there are no external dependencies other than lombok, (which would be trivial for you to remove if you don't want that).

My company, Meticy LLC, is happy to open source and donate this code as is, to mybatis, to use in any way you wish, if your organization finds it, or parts of it, useful.

The only feature that in my opinion is missing that one might want to add is the ability to work with multiple data sources, but we have a single data source so I have not gone into that.

Thank you again.
Latest version of code as described at #162 (comment): mybatis-migrations-spring-boot.zip

@h3adache
Copy link
Member

h3adache commented Mar 3, 2020 via email

@jmoraleda
Copy link
Author

I added the feature where the changelog table is created automatically mybatis-migrations-spring-boot.zip

@Bessonov
Copy link

Hey folks, I've switched from Java to Node and therefore I'm not able to test and maintain the project mentioned by @jmoraleda in regards of time and quality. Is there any work happens @h3adache ? It would be nice to have an official integration. If you want to use my project as a base or in parts I'm very happy to grant everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants