vaadin / flow-spring-examples

Examples for Vaadin and Spring Boot
https://vaadin.com/docs/flow/spring/tutorial-spring-basic.html
56 stars 43 forks source link

Throuble with the new VAADIN 14 resource location #53

Open linspinho opened 5 years ago

linspinho commented 5 years ago

### ERROR when using vaadin 14 + spring boot 2 in Production MODE

IT seems SPRING can´t find CSS file in production.

2019-11-26 16:21:02.035 DEBUG 6944 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : GET "/frontend-es6/com/github/appreciated/app-layout/app-layout-styles-lumo.css", parameters={} 2019-11-26 16:21:02.035 DEBUG 6944 --- [nio-8080-exec-7] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to org.springframework.web.servlet.mvc.ServletForwardingController@1d97afdc 2019-11-26 16:21:02.051 DEBUG 6944 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND 2019-11-26 16:21:02.051 DEBUG 6944 --- [nio-8080-exec-8] o.s.web.servlet.DispatcherServlet : GET "/frontend-es6/com/github/appreciated/app-layout/left/left-responsive-hybrid.css", parameters={} 2019-11-26 16:21:02.051 DEBUG 6944 --- [nio-8080-exec-8] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to org.springframework.web.servlet.mvc.ServletForwardingController@1d97afdc 2019-11-26 16:21:02.067 DEBUG 6944 --- [nio-8080-exec-8] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND

DOES NOT happens when using in DEBUG MODE

2019-11-26 17:32:38.367 DEBUG 6444 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : GET "/frontend/com/github/appreciated/app-layout/app-layout-styles-lumo.css", parameters={} 2019-11-26 17:32:38.382 DEBUG 6444 --- [nio-8080-exec-2] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to org.springframework.web.servlet.mvc.ServletForwardingController@e31a27 2019-11-26 17:32:38.601 DEBUG 6444 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet : GET "/frontend/com/github/appreciated/app-layout/left/left-responsive-hybrid.css", parameters={} 2019-11-26 17:32:38.601 DEBUG 6444 --- [nio-8080-exec-3] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to org.springframework.web.servlet.mvc.ServletForwardingController@e31a27 2019-11-26 17:32:38.679 DEBUG 6444 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed 200 OK 2019-11-26 17:32:38.710 DEBUG 6444 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet : Completed 200 OK @linspinho linspinho added the question label now

linspinho commented 4 years ago

As indicated from another user here: https://github.com/appreciated/vaadin-app-layout/issues/297, I have fix that with a workaround: "UI.getCurrent().getPage().setLocation(...);" instead of "this.getUI().ifPresent(ui -> ui.navigate(...));" in my login page. It seems to be a vaadin bug, as the addon provider stated.