目录

tomcat_https_配置

生成keystore文件

keytool -genkey -alias tomcat -keyalg RSA -keystore /root/tomcat.keystore

注意:记住输入的密码,比如:123456

注意:第一个输入的名字与姓氏,必须填服务器的ip(localhost)

tomcat配置

重启tomcat

此时,启动报错:

java.lang.IllegalStateException: 
Unable to complete the scan for annotations for web application [] due to a StackOverflowError. 
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. 
The class hierarchy being processed was 
[org.bouncycastle.asn1.ASN1Boolean->org.bouncycastle.asn1.DERBoolean->org.bouncycastle.asn1.ASN1Boolean]

解决方案:

在tomcat下的conf目录的catalina.properties文件最后一行加上这句,再重启即可解决。

org.apache.catalina.startup.ContextConfig.jarsToSkip= bcprov* .jar