-
Notifications
You must be signed in to change notification settings - Fork 164
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
Flow Servlet should co-exist nicely with other Spring Servlets #2660
Comments
We should really not fall into the same pit as with the FW Spring-addon, where it is impossible to use e.g. reverse proxies with Vaadin & Spring. |
Absolutely. I don't know the internals, but we have several Spring apps in production working behind reverse proxies without issues. If the |
I've done some investigation and I don't really see any issue with Spring add-on.
So a vaadin servlet instance works on "/" url mapping and a So could you provide a more specific usecase if you have an issue with Spring add-on? |
I'm not using @Configuration
@EnableAuthorizationServer
class AuthorizationServer extends AuthorizationServerConfigurerAdapter {
// ...
} which maps various url, e.g.
Problem is: every access to those URLs is managed by Flow which return its HTML with an error message, e.g.
Removing Flow, the other servlets start working again. |
But do you use Spring Boot or it's a Web MVC application ? |
Spring Boot. |
Just for the reference:
Here is the addition in
Apparently the mapping is registered in some specific way (or may be with a low priority) when |
And by the way.
So it's about the way how any servlet is registered and how |
Thank you @denis-anisimov for the investigation, now it's all much clear. The same happens with other Spring "starter" mappings, e.g. with graphql-spring-boot which maps So I investigated further on the internals of both the OAuth and GraphQL plugins and it seems the URLs that stop working are those mapped via I see a couple of options here (just as out of my mind, probably not realistic):
Last chance is obviously to explicitly map Vaadin Spring servlet to something not root, e.g. |
Yes, it uses So we need to find a way to workaround somehow this. FW8 Spring add-on solves somehow this issue, so it should be possible to do. |
The FW8 Spring add-on maps the vaadin servlet to |
Yeah, I know. |
If I include Flow as a dependency in a Spring project, all paths are managed by the Flow Servlet (since
urlPatterns = "/*"
) and this somehow takes precedence on more specific paths, e.g./oauth2/token
.Having Flow co-existing with other Spring features should not require extra configuration.
The text was updated successfully, but these errors were encountered: