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

Profile issues with Spring add-on #576

Open
denis-anisimov opened this issue Mar 23, 2020 · 0 comments
Open

Profile issues with Spring add-on #576

denis-anisimov opened this issue Mar 23, 2020 · 0 comments

Comments

@denis-anisimov
Copy link

This PR allows to use Spring Profiles with Routes :#575

But it works ONLY with Spring boot: because we are using a special way to find all classes annotated with @Route via ClassPathScanningCandidateComponentProvider .
The ClassPathScanningCandidateComponentProvider instance filter out annotated classes annotated with Profile whose profiles are not active.

But in Spring MVC case e.g. ClassPathScanningCandidateComponentProvider is never used.
Also ClassPathScanningCandidateComponentProvider won't be used if the application works as a war.
It means that Profiles won't be respected at runtime : classes are scanned using standard Servlet 3.0 specification.

So in not Spring boot case ANY route will be enabled even if its profile is not enabled.
( so #575 just allows to use routes which are annotated with profile).
To be able to support profiles we need changes in SpringInstantiator class: it's method getOrCreate should take into account that classes may be disabled via profile.
At the moment SpringInstantiator will make an instance regardless of its profile.

@denis-anisimov denis-anisimov added this to Needs triage in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) via automation Mar 23, 2020
@denis-anisimov denis-anisimov moved this from Needs triage to P3 - Low Priority in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) Apr 10, 2020
@pleku pleku moved this from Old low priority - to be moved/cleaned to New P2 in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) Sep 9, 2020
@pleku pleku added the bug label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

2 participants