整合shiro出现【Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler】

跑的时候出现错误:

Description:

An attempt was made to call the method org.quartz.Scheduler.getListenerManager()Lorg/quartz/ListenerManager; but it does not exist. Its class, org.quartz.Scheduler, is available from the following locations:

    jar:file:/E:/apache-maven-repo/org/opensymphony/quartz/quartz/1.6.1/quartz-1.6.1.jar!/org/quartz/Scheduler.class

It was loaded from the following location:

    file:/E:/apache-maven-repo/org/opensymphony/quartz/quartz/1.6.1/quartz-1.6.1.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler

查询依赖的时候发现它是shiro的一个可选项,直接把它exclusion

<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-all</artifactId>
    <version>1.4.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-quartz</artifactId>
        </exclusion>
    </exclusions>
</dependency>

猜你喜欢

转载自www.cnblogs.com/LUA123/p/10125918.html
今日推荐