title: Spring boot configure custom jsessionid for embedded server
body: <p>I want to configure my servlet context, such as setting a custom jsessionId key (see <a href="https://stackoverflow.com/questions/877064/changing-cookie-jsessionid-name">Changing cookie JSESSIONID name</a>)</p>
  
  <p>I believe I can use the <code>SpringBootServletInitializer</code> when running a WAR file, manipulating the <code>servletContext</code> in <code>onStartup()</code>. However, when I run on an embedded application server, using
  <code>new SpringApplicationBuilder().run()</code>, I don't know the best place to manipulate the servlet context.</p>