在學習配置shiro的時候啓動就直接報了下邊的錯誤
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.scheduling.quartz.SchedulerAccessor.registerListeners(SchedulerAccessor.java:351)
The following method did not exist:
org.quartz.Scheduler.getListenerManager()Lorg/quartz/ListenerManager;
The method's class, org.quartz.Scheduler, is available from the following locations:
jar:file:/C:/Users/Admin/.m2/repository/org/opensymphony/quartz/quartz/1.6.1/quartz-1.6.1.jar!/org/quartz/Scheduler.class
jar:file:/C:/Users/Admin/.m2/repository/org/quartz-scheduler/quartz/2.3.0/quartz-2.3.0.jar!/org/quartz/Scheduler.class
It was loaded from the following location:
file:/C:/Users/Admin/.m2/repository/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-all這個jar包的問題
可以直接寫成這樣就會將quartz的jar包排除在外了
<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>