[英]How to configure SSL / HTTPS on Spring?
I'm working on a Spring Java app that requires HTTPS, and I followed Spring's guide to configure SSL . 我正在开发一个需要HTTPS的Spring Java应用程序,我按照Spring的指南来配置SSL 。
My application.properties file contains the following: 我的application.properties文件包含以下内容:
server.port = 8443
server.ssl.key-store = classpath:keystore.p12
server.ssl.key-store-password = password
server.ssl.key-password = password
server.ssl.keyStoreType = JCEKS
server.ssl.keyAlias = alias
When the app is run, the console outputs Tomcat started on port(s): 8443 (https)
, but any request to the server results in a 0 NO RESPONSE
status. 当应用程序运行时,控制台输出Tomcat started on port(s): 8443 (https)
,但是对服务器的任何请求都会导致0 NO RESPONSE
状态。
What am I missing? 我错过了什么?
Problem seems to be the specified encryption algorithm. 问题似乎是指定的加密算法。 I was generating the key using keytool
, with -keyalg AES
. 我使用keytool
生成密钥,使用-keyalg AES
。 Changed it to use RSA with -keyalg RSA
and it works now. 将其更改为使用带有-keyalg RSA
,它现在可以使用了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.