You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
viaClassPathScanningCandidateComponentProvider
.The
ClassPathScanningCandidateComponentProvider
instance filter out annotated classes annotated withProfile
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 methodgetOrCreate
should take into account that classes may be disabled via profile.At the moment
SpringInstantiator
will make an instance regardless of its profile.The text was updated successfully, but these errors were encountered: