1

Where are the Embedded Tomcat configuration files for spring-boot-starter-web? I want to set autoDeploy="true" to make the Embedded Tomcat hot deploy changes to my html files.

4
  • are you using maven in your project to download the depnedencies? Commented Sep 27, 2014 at 3:52
  • docs.spring.io/spring-boot/docs/current/reference/htmlsingle/… Commented Sep 27, 2014 at 5:53
  • I suppose changing html files doesn't require autoDeploy Commented Sep 27, 2014 at 8:13
  • @hsluo - HTML files require a redeploy w/ the embedded container. Commented Sep 29, 2014 at 1:08

1 Answer 1

4

An embedded container has no notion of an autoDeploy (that's a container feature that applies to deployed war files). If you just want to reload static resources at dev time, the docs are here: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-hotswapping

Sign up to request clarification or add additional context in comments.

3 Comments

Hi Dave, Our spring-boot app (web) consumes static contents (.html, .jsp, images, .css etc.) that is a mounted path from an external. We noticed that our spring-boot app reflects ONLY when there is a NEW jsp file or other static files dropping in that mounted directory, we can see the change from browser. However, if a static file is UPDATED, browser does not reflect until we restart the app. Besides using spring-boot-devtools for PROD, is there a way to configure it without restarting? We use embedded tomcat, configured server.tomcat.context.preresources.base=/external/contents/ Thanks!
Did you try spring.resources.static-locations=file:///path/to/external/contents? (I don't think server.tomcat.context.preresources.base does anything at all in a vanilla Spring Boot app. Maybe you tweaked it?)
Thank you for your reply! Let me try that. spring.resources.static-locations=file:///path/to/external/contents

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.