Im running in an issue with the new Vaadin Flow issue which makes me crazy the last days, so i hope you guys can help me.
Technologies i use:
- Vaadin Flow Beta 8
- Spring Boot 2.0.1.RELEASE
- Embedded Tomcat
- Maven as build tool
Project layout:
Parent project
|
|-api
|
|–common
|
|-webapp
Basic situation: i have a monolithic Vaadin Flow application which now i want to cut in 3 pieces: webapp, common and api. Before this split, everything works fine.
Current situation: When i try to navigate to localhost:8080/ i got this following error:
Caused by: java.lang.IllegalStateException: Can't find resource 'frontend://styles/landing.html' via the servlet context
at com.vaadin.flow.component.polymertemplate.DefaultTemplateParser.getTemplateContent(DefaultTemplateParser.java:111) ~[flow-server-1.0.0.beta7.jar:na]
at com.vaadin.flow.component.polymertemplate.TemplateDataAnalyzer.parseTemplate(TemplateDataAnalyzer.java:180) ~[flow-server-1.0.0.beta7.jar:na]
at com.vaadin.flow.component.polymertemplate.TemplateInitializer.<init>(TemplateInitializer.java:91) ~[flow-server-1.0.0.beta7.jar:na]
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:78) ~[flow-server-1.0.0.beta7.jar:na]
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:93) ~[flow-server-1.0.0.beta7.jar:na]
at com.flatNow.ui.common.abstracts.AbstractView.<init>(AbstractView.java:6) ~[classes/:na]
at com.flatNow.ui.landing.LandingView.<init>(LandingView.java:23) ~[classes/:na]
at com.flatNow.ui.landing.LandingPresenter.<init>(LandingPresenter.java:18) ~[classes/:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_162]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_162]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_162]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_162]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
... 109 common frames omitted
The corresponding View class is:
@Getter
@Tag("welcome-view")
@HtmlImport("styles/landing.html")
class LandingView extends AbstractView<TemplateModel> {
}
My resources are laying under src/main/resources, there are the folder frontend and assets.
I try the following things things:
Change the htmlImport to context://frontend/styles/landing.html , /frontend/styles/landing.html , ../frontend/styles/landing.html
https://github.com/vaadin/skeleton-starter-flow-spring/issues/28
The weird part is, that i've tried to run the project in Eclipse and it worked out of the box. No issues.
I hope you can help me guys, if i've missing something please point it out!