title: How to set to disable browser cache in spring boot?
body: <p>i want set disable browser cache(cache-control: no-cache, no-store, max-age=0) in spring boot.</p>
  
  <p>my env</p>
  
  <pre><code>  spring-boot: 2.1.2
    spring-security: not use
  </code></pre>
  
  <p>i searched if i want to set response headers's cache-control: no-cache,
  just add at 'application.yml'.</p>
  
  <p>like this</p>
  
  <pre><code>spring.resources.cache:
    cachecontrol:
      max-age: 0
      no-cache: true
      no-store: true
      cache-private: true
  </code></pre>
  
  <p>or</p>
  
  <pre><code>spring.resources.chain.cache: false
  </code></pre>
  
  <p>but it does not worked.
  <br/><br/></p>
  
  <p>i cant show cache-control header in my chrome browser's response headers.
  <br/><br/></p>
  
  <p>in spring-framework, i just set</p>
  
  <pre><code>&lt;mvc:mapping path="/**"/&gt;
      &lt;bean id="webContentInterceptor" class="org.springframework.web.servlet.mvc.WebContentInterceptor"&gt;
           &lt;property name="cacheSeconds" value="0"/&gt;
           &lt;property name="useExpiresHeader" value="true"/&gt;
           &lt;property name="useCacheControlHeader" value="true"/&gt;
           &lt;property name="useCacheControlNoStore" value="true"/&gt;
      &lt;/bean&gt;
  &lt;/mvc:interceptor&gt;
  </code></pre>
  
  <p><strong>how to set disable browser cache in spring boot without spring security?</strong></p>
  
  <p>thank you.</p>