Given I have file in
c:\path\to\file\keystore.jks
and my application.properties file contains
server.ssl.key-store=c:\path\to\file\keystore.jks
I get the following exception
java.io.FileNotFoundException: C:\Windows\Temp\tomcat.2910824355292831382\file:\c:\path\to\file\keystore.jks (The filename, directory name, or volume label syntax is incorrect)
What is the correct way to specify the path?
Do not rely on absolute paths. Put the file into same directory as Spring Boot JAR and add this line into your application.properties:
server.ssl.key-store=file:keystore.jks
Second option is to pass system variable to -Dserver.ssl.key-store=file:keystore.jks
Below worked for me with Tomcat 8.5.2:
Windows:
server:
ssl:
key-store: file:C:\<complete file path with extension>
Linux:
server:
ssl:
key-store: file:/J2EE/<complete file path with extension>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With