org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole (I) V, когда @EnableKafka - PullRequest
0 голосов
/ 10 февраля 2019

org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole (I) V

это происходило при установке @EnableKafka в классе конфигурации

maven зависимости:

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>5.0.5.RELEASE</version>
</dependency>
<dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-webmvc</artifactId>
     <version>5.0.6.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>5.1.4.RELEASE</version>
</dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>5.1.4.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.kafka</groupId>
    <artifactId>spring-kafka</artifactId>
    <version>2.2.3.RELEASE</version>
</dependency>

Спасибо

1 Ответ

0 голосов
/ 10 февраля 2019

Это несоответствие версии модуля Spring.
Согласно JavaDoc , метод BeanDefinition#setRole существует из 5.1.

Так что проверьте свою зависимость org.springframework.spring-beans.Spring Kafka 2.2.3.RELEASE требуется Spring 5.1.4

Теперь, когда вы обновили свой вопрос, обновите spring-webmvc и spring-security-config

spring-webmvc          5.1.4.RELEASE
spring-security-config 5.1.3.RELEASE
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...