Reputation: 483
I created a new project with spring boot that includes vaadin and springmvc.
I added a restcontroller class and a vaadin view class annotated with @Route
, yet when trying to access the view I receive a blank pages and a lot of failed http request with 405 access code to /VAADIN
and /frontend
paths.
When removing the restcontroller, the vaadin view worked.
Upvotes: 4
Views: 1036
Reputation: 483
The solution was adding a servlet mapping to the vaadin resources:
@WebServlet(
urlPatterns = {
"/VAADIN/*", "/frontend/*"
},
initParams = {
@WebInitParam(name = "productionMode", value = "false")
})
public class MyServlet extends VaadinServlet {}
Don't forget to add @ServletComponentScan
annotation.
Upvotes: 4