shiro-core包引用的版本问题

在做shiro学习时,遇到这样的问题:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.commons.beanutils.ConvertUtilsBean.(ConvertUtilsBean.java:154)
at org.apache.commons.beanutils.BeanUtilsBean.(BeanUtilsBean.java:113)
at org.apache.shiro.config.ReflectionBuilder.(ReflectionBuilder.java:126)
at org.apache.shiro.config.ReflectionBuilder.(ReflectionBuilder.java:120)
at org.apache.shiro.config.IniSecurityManagerFactory.(IniSecurityManagerFactory.java:64)
at org.apache.shiro.config.IniSecurityManagerFactory.(IniSecurityManagerFactory.java:68)
at org.apache.shiro.config.IniSecurityManagerFactory.(IniSecurityManagerFactory.java:73)
at com.chabansheng.shiro.HelloWorld.main(HelloWorld.java:15)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 8 more

检查后,是shiro-core包引用的版本问题,使用1.4.0会出现上面的问题,使用1.2.4就不会出现。

转载于:https://www.cnblogs.com/375163374lsb/p/10526818.html

你可能感兴趣的:(java)