具体报错如下
Caused by: 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.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVe
ctor]
因为tomcat启动会去扫描jar包,看错误信息org.bouncycastle.asn1.ASN1EncodableVector,是出在这个类
这个类似出现在bcprov*.jar这个包
所以在tomcat的conf目录里面catalina.properties的文件,
在tomcat.util.scan.DefaultJarScanner.jarsToSkip=里面加上bcprov*.jar过滤
启动不会报错了
或者升级tomcat版本(绝对解决)