开发者

java.lang.NoClassDefFoundError: org/springframework/core/io/ResourceLoader

开发者 https://www.devze.com 2023-03-25 00:25 出处:网络
I am using spring for some testing, 开发者_如何学编程and I am getting this error: java.lang.NoClassDefFoundError: org/springframework/core/io/ResourceLoaderat org.springframework.mock.web.MockHttpSer

I am using spring for some testing, 开发者_如何学编程and I am getting this error:

java.lang.NoClassDefFoundError: org/springframework/core/io/ResourceLoader  at org.springframework.mock.web.MockHttpServletRequest

The JAR that I installed is: spring-test-2.5.6.jar

Do I need another jar besides this?

Thanks


You also need spring-core-*.jar. You can usually tell what jars you are missing by looking at the package. In this org.springframework.core.* is all in the core jar file.


I strongly advice using Maven (or Ivy or Gradle) for dependency management. It can save you loads of pain in resolving these types of secondary and tertiary dependencies.


As per Amir's answer the jar you need is spring-core. You can generally solve this sort of issue by consulting jarfinder http://www.jarfinder.com/index.php/java/search/~org.springframework.core.io.ResourceLoader~

0

精彩评论

暂无评论...
验证码 换一张
取 消