spring-boot executable war keystore not found

In my Spring Boot application I resolved this issue by placing .jks file into resource folder.

enter image description here


Update: As a result of this enhancement request, the limitation described below no longer applies. Tomcat 8.0.28+ and 7.0.66+ can load a key store from within a jar file.

Original answer

I guess that you're using Tomcat as the embedded servlet container? As noted in the reference documentation, Tomcat does not currently support loading a keystore or trust store from within a jar:

Tomcat requires the key store (and trust store if you’re using one) to be directly accessible on the filesystem, i.e. it cannot be read from within a jar file.

You should move keystore.jks out of your jar and update server.ssl.key-store with its location on the file system.