学无先后,达者为师

网站首页 编程语言 正文

jdk版本不兼容 Error creating bean with name ‘springSecurityFilterChain‘

作者:不会拉网线的通信学生 更新时间: 2024-03-08 编程语言

报错如下

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.RuntimeException: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
原因是jdk版本不兼容

<!--下面三个适配jdk11兼容性问题-->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.activation/activation -->
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime -->
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.0-b170127.1453</version>
        </dependency>

实际测试后依然会存在其他问题!!!!!
建议直接换到jdk8!!!!!!!!!!!!!!

原文链接:https://blog.csdn.net/qq_45689173/article/details/135072226

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新