1

I have a Spring Boot java application which I need to deploy in Tomcat. In index.html i there is code like and . Index.html, bundle.js and test.jpg are located in same folder.

If i launch :bootRun task in gradle (analog to "mvn spring-boot:run") - everything works fine, but when i deploy war file to Tomcat image and script files are not loaded. I tried various paths in "src" attribute and tried to move files in webapps/app directory tree but have not succeeded.

Some additional info: application uses Spring 3.0, so main class extends SpringBootServletInitializer, and there is no web.xml file.

How can this be fixed?

Alexeev Mikhail
  • 315
  • 3
  • 10
  • Possible duplicate of [Spring boot WAR deployed to Tomcat and missing context for static resources](https://stackoverflow.com/questions/40203618/spring-boot-war-deployed-to-tomcat-and-missing-context-for-static-resources) – Catchwa Oct 04 '17 at 02:56
  • @Catchwa I've tried everything from that post and what's more I had relative path from the begining – Alexeev Mikhail Oct 04 '17 at 20:51
  • unlike the other question, you haven't provided any actual code, configuration values, network requests, project structures, etc. So it's difficult to provide any more help until you do so. – Catchwa Oct 05 '17 at 00:13

0 Answers0