Search code examples
jspspring-boot

Spring Boot 1.5.1 caches JSP


I have been running Spring Boot 1.4.4 without any problem and yesterday tried to upgrade the version to 1.5.1 and it works. But when I change something on my JSP pages I don't see the changes in my browser.

After restarting application I see them. Looks like JSP is cached but I don't know why and how to disable it.

Can anybody help me?


Solution

  • I guess that this is because default behavior was changed. In older Spring Boot versions JSP worked in the development mode that was affecting performance and now this mode is disabled by default. However this mode is enabled automatically when you're using spring-boot-devtools.

    To turn on development mode manually, add the following property to the application.properties file:

    server.jsp-servlet.init-parameters.development: true
    

    Related issue: https://github.com/spring-projects/spring-boot/issues/7039