0

После запуска получаю ошибку

13:47:31,336 WARN  [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 21) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.selectInvocableMethod(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;
13:47:31,337 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 21) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.selectInvocableMethod(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;

BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping'

я так понимаю, что у меня несовместимость версий, не могу понять где.

<properties>
        <spring.version>4.3.0.RELEASE</spring.version>
        <spring.security.version>4.0.4.RELEASE</spring.security.version>
        <apache.logging.version>1.1.1</apache.logging.version>
        <apache.commons.version>1.4</apache.commons.version>
        <slf4j.version>1.7.7</slf4j.version>
        <jackson.version>2.9.7</jackson.version>
    </properties>

1 ответ 1

0

Попробуйте добавить DependencyManagment в pom.xml, должно помочь исправить конфликт версий

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>4.3.0.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
4
  • спасибо, но подключение такого модуля дает такую ошибку мавена. Reason: Not a v4.0.0 POM. for project org.springframework:spring-framework-bom at C:\Users\y.alekseenko\.m2\repository\org\springframework\spring-framework-bom\4.3.0.RELEASE\spring-framework-bom-4.3.0.RELEASE.pom 14 янв 2019 в 11:11
  • хотя по самому пути такой файл 4.3.0.RELEASE.pom лежит 14 янв 2019 в 11:13
  • иногда бывает нужно кэш сбросить, сделайте mvn clean
    – Komdosh
    14 янв 2019 в 11:25
  • при mvn clean эта ошибка и возникает 14 янв 2019 в 11:31

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.