I am trying to enable SSL for my Spring Boot application for testing. I created a keystore file with this command line:
keytool -genkey -alias tomcat
-storetype PKCS12 -keyalg RSA -keysize 2048
-keystore keystore.p12 -validity 3650
And added the configuration below to the application.properties file:
server.port=8443
server.ssl.key-store: keystore.p12
server.ssl.key-store-password: mypassword
server.ssl.keyStoreType: PKCS12
server.ssl.keyAlias: tomcat
When I run the application with the built-in version of Tomcat 8, SSL is successfully enabled without errors during the build process.
But when I run it with the built-in version of Tomcat 7, changing the pom.xml file as follows:
<properties>
<tomcat.version>7.0.65</tomcat.version>
</properties>
SSL is not activated, and I encounter these errors:
java.io.FileNotFoundException: /tmp/tomcat.4863947968145457153.8443/file:/home/yahyaharif/ spring-workspace / demossl / keystore.p12 (There is no such file or directory)
org.apache.catalina.LifecycleException: [ [org.apache.coyote.http11.Http11NioProtocol-8443]]
org.springframework.boot.context.embedded.EmbeddedServletContainerExcepti > on: Tomcat
, , bean , .
, .
, SSL Tomcat 8, Tomcat 7?