首页 > 解决方案 > 更正应用程序的类路径,使其包含一个兼容的 io.jsonwebtoken.lang.Classes 版本

问题描述

我的Springboot-application. 我按照这个人的指示 https://www.youtube.com/watch?v=NQmYdwQnenQ

但现在我已经尝试了我所知道的一切。我认为问题隐藏在 pom.xml 中,但我找不到任何东西。

谁能告诉我问题出在哪里,我该如何解决?

github:https ://github.com/FaSe22/Blog/tree/ben

这是错误日志: https ://ibb.co/VLzvn0T

这是 pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.sebastianBen</groupId>
    <artifactId>blogProject</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>blogProject</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-jwt</artifactId>
    <version>1.1.1.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt -->
<!-- <dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt</artifactId>
    <version>0.2</version>
</dependency> -->

  <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt</artifactId>
    <version>0.9.1</version>
    <name>JSON Web Token support for the JVM</name>
    <packaging>jar</packaging>
    <url>https://github.com/jwtk/jjwt</url>


<dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt-api</artifactId>
    <version>0.10.5</version>
</dependency>
<dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt-impl</artifactId>
    <scope>runtime</scope>
    <version>0.10.5</version>
</dependency>
<dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt-jackson</artifactId>
    <scope>runtime</scope>
    <version>0.10.5</version>
</dependency>








<!-- <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <scope>runtime</scope>
            <artifactId>jjwt-api</artifactId>
            <version>0.10.5</version>
        </dependency>
<dependency>
            <groupId>io.jsonwebtoken</groupId>
            <scope>runtime</scope>
            <artifactId>jjwt-impl</artifactId>
            <version>0.10.5</version>
        </dependency>
<dependency>
            <groupId>io.jsonwebtoken</groupId>
            <scope>runtime</scope>
            <artifactId>jjwt-jackson</artifactId>
            <version>0.10.5</version>
        </dependency>

 -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-validation</artifactId> 
</dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

标签: javaspringspring-bootspring-security

解决方案


推荐阅读