-
Notifications
You must be signed in to change notification settings - Fork 169
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
Allow simpler extension of the SpringServlet / structuring of SpringBootAutoConfiguration #19994
Comments
A simpler approach to this would be to implement AbstractView which will be extended by Route classes and implement access delegate method there which also takes care of handling thread locals before and after ui.access(..).
|
We can't do something like you suggested above, as the The data that we need available at the point that However, the hook to do what we want to do is there, and documented in the Javadocs - so I don't understand the reluctance to make the facility easier to use. If we're not expected to use it, could I suggest that it be deprecated or the documentation updated to reflect this?
|
Describe your motivation
We have certain ThreadLocal values that need to be set before access tasks are run.
The
com.vaadin.flow.server.VaadinService
provides a hook to allow overriding theaccessSession
, and in order to do this, one needs to extend theVaadinServlet
class and override thecreateServletService()
, which used to be advertised as ahttps://vaadin.com/docs/v14/flow/advanced/tutorial-application-lifecycle.
This documentation has been removed in the V24 documentation, yet no other strategy for achieving the same process has been given, although it seems that this is still possible but requires requires cut + pasting of the
com.vaadin.flow.spring.SpringBootAutoConfiguration#servletRegistrationBean
.Describe the solution you'd like
Could the auto-configuration be modified in such a way that cut and pasting the entire
servletRegistrationBean
is not necessary, for example, the only piece of code that I'd like to have to supply is thespringServletBean
definition in the following configuration:Describe alternatives you've considered
Any other hooks to execute code prior to access tasks being run and cleaned up afterwards would be perfectly acceptable.
Additional context
Is there anything else you can add about the proposal?
The text was updated successfully, but these errors were encountered: