java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isJavaLanguageInterface

错误记录:

Caused by: java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isJavaLanguageInterface(Ljava/lang/Class;)Z
at org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:320)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:190)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:174)
at org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:230)
at org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:63)
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:729)
at org.springframework.beans.AbstractNestablePropertyAccessor.isWritableProperty(AbstractNestablePropertyAccessor.java:562)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1615)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1357)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
… 58 more

原因

子项目与父项目的web.xml文件下重复出现了jar包,并且版本不一致。导致版本冲突。

//子项目下的pom.xml
		<dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-contextartifactId>
            <version>5.0.3.RELEASEversion>
            <scope>compilescope>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-webartifactId>
            <version>5.0.3.RELEASEversion>
            <scope>compilescope>
        dependency>
//父项目下个的pom.xml
	<properties>
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
        <maven.compiler.source>1.8maven.compiler.source>
        <maven.compiler.target>1.8maven.compiler.target>
        
        <spring.version>5.0.2.RELEASEspring.version>
        
        <mybatis.version>3.2.6mybatis.version>
        
        <slf4j.version>1.7.7slf4j.version>
        <log4j.version>1.2.17log4j.version>
        <c3p0.version>0.9.5.2c3p0.version>
        <taglibs.version>1.1.2taglibs.version>
    properties>

解决方法

将子项目中的重复部分删除即可

你可能感兴趣的:(bug记录)