title: How to disable Tomcat session persistence in Spring Boot via Manager pathname?
body: <p>In Tomcat there is a well known configuration option in <code>conf/context.xml</code> to disable session persistence:</p>
  
  <pre><code>&lt;!-- Uncomment this to disable session persistence across Tomcat restarts --&gt;
  &lt;Manager pathname="" /&gt;
  </code></pre>
  
  <p>When uncommented as shown here, the applied implementation of <code>org.apache.catalina.Manager</code> (e.g. <code>org.apache.catalina.session.StandardManager</code>) does not have a <code>pathname</code> to tell it where to store sessions to the disk, and thus it does not write session files to disk (e.g. on shutdown), which is what we want.</p>
  
  <p>In other words, this disables the standard Tomcat feature to sustain sessions through server restart.</p>
  
  <p>How can the same be achieved in Spring Boot with embedded Tomcat?</p>
  
  <p>Perhaps the Manager object can somehow be obtained to set the property pathname to null?</p>