title: How can I specify my .keystore file with Spring Boot and Tomcat?
body: <p>I'm trying to set up Spring Security to work with Spring Boot's embedded Tomcat instance.  There are quite a few basic samples that do this but I'm stuck where they leave off -- they do basic authentication over HTTP (not HTTPS).  </p>
  
  <p>I could probably make it work if I had access to the Tomcat configuration files (<code>server.xml</code>) but since Spring Boot uses an embedded Tomcat instance (which is otherwise a huge convenience), I dont have access to the Tomcat configuration files (at least, not to my knowledge). </p>
  
  <p>There may be an <code>application.properties</code> setting for this but I haven't been able to track it down.  I've seen references to a <code>server.contextPath</code> field in <code>application.properties</code> that I suspect may have something to do with replacement Tomcat config files.  Even if it is related, I wouldn't know where to begin anyway -- all of the Tomcat SSL instructions I've seen start with editing an existing <code>server.xml</code> file, not building one from scratch.</p>
  
  <p>Can this be done with Spring Boot (either by somehow specifying a snippet of <code>server.xml</code> or through other means)?  If not, what would be the simplest way to do this?  I understand that I may need to exclude the Tomcat component of Spring Boot but I'd prefer to avoid that if possible.</p>