我使用的是Spring启动版本2.1.11。在我的pom.xml
中添加spring-security-oauth2-autoconfigure
后。运行应用程序时出现以下错误。
"java.lang.SecurityException: class "org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings"'s signer information does not match signer information of other classes in the same package"
这是因为要加载的库中存在一些jar版本不兼容的问题。罐子地狱。尝试排除组org.bouncycastle
。您也可以指定版本:bcprov-jdk16
等级:
implementation(group: 'aaa', name: 'bbb', version: '1.0.0') {
exclude group: 'org.bouncycastle'
}
对于maven:
<dependency>
<groupId>aaa</groupId>
<artifactId>bbb</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
</exclusion>
</exclusions>
</dependency>