-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature Request: Disable Spring Boot auto config if migration not enabled #1171
Comments
Hi, thanks for raising this. If there's no config, I cannot give you to The only exception that can be thrown from the other method should be if the migrations are - as you write - not in place. Doesn't help setting Btw I see you are located in Aachen (I am too)? Are you able to share about your use case? |
Hi, Yes you're right, I'm also located in Aachen. Seems to be a small world :D Since I use Testcontainers at development time I just came to the conclusion that I could change the migrations dependency to test scope. This way it's still usable during development and completely excluded in production builds. |
Sorry for getting back late to you. You can set
in your Spring Boot config: That will disable Neo4j-Migrations on startup, but will still give you both a If this helps, please close the ticket :) Eitherway, kind regards and all the best for 2024. |
Hi and thanks, yes, your answer helped me. Seems that I missed the use case of having the migration beans available while the migration itself disabled. I will close the ticket. :) Wishing you a Happy New Year! |
Thank you, Dimitrios and same to you! |
Hello,
I came across the issue that even if with
org.neo4j.migrations.enabled=false
the Spring Boot auto config will load at startup.This is normally not an issue since the migration itself does not run. But in some cases, an unexpected behavior can occur.
E.g. at startup the method neo4jMigrationsConfig will be called, which can lead to an exception here if the other migrations properties are not well-defined.
In contrast this bean for example will only load if the migrations are enabled. So I wonder if we can apply the condition on class level or at least prevent the possible exception if migrations are disabled?
The text was updated successfully, but these errors were encountered: