I want to configure Spring Boot Embedded Servlet Container + GWT. The way I want is either create a jar/war file that just contains the compiled gwt files & static resources. I want to load jars from lib/* and config files from classpath.
I couldn't find any working example. There is one actually, https://github.com/Ekito/spring-boot-gwt, but all the dependencies and configs are still in the war.
Can someone suggest a solution ?
I'd like to provide more details to Gokhan's answer for others who wouldn't see the static files generated by the gwt compiler lie *.nocache.js being requested and responded from their locations.
I also started from the https://github.com/Ekito/spring-boot-gwt example and haven't seen this working out of the box like in https://github.com/interseroh/demo-gwt-springboot (where I couldn't figure out why it is working). So you should use
instead of
that is according to Gokhan's answer. And also, don't leave the war in packaging section as well as war-maven-plugin. Thus youl'get the generated static files being placed into the actual /public/classes/ folder being then packaged to the jar.
After long search & test, here is the solution that I come up with:
```
```
my project structure is is same with original project, https://github.com/Ekito/spring-boot-gwt, except some little changes:
As a result, I have a runable jar, but run by org.springframework.boot.loader.PropertiesLauncher. Single jar works as expected, Tomcat doesnt work as stated here: http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html#boot-features-jsp-limitations.
Also, I can move the lib folder outside the jar file, but I in order to set the
loader.path
property, I need to put it to application.properties inside the jar file. I should be able to use -Dloader.path but didn't work.I'll check with spring team. But so far, it's promising.