Spring報錯:org/springframework/core/ResolvableTypeProvider
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/ResolvableTypeProvider
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.lin.Test.main(Test.java:10)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.ResolvableTypeProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
原因:jar包沖突,我引入了spring的其他包,包含了spring-core,且版本為4.3.16.RELEASE,而我自己引入的spring-core版本為4.1.1.RELESASE,從而導致spring-core包版本不一致產生了沖突,最後運行報錯。
解決辦法:將spring-core的版本改為4.3.16.RELEASE,解決問題
Spring報錯:org/springframework/core/ResolvableTypeProvider