Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Spring Boot 2.6 + Integración - dependencia circular internalPublisherAnnotationBeanPostProcessor

Hemos actualizado a la versión 2.6 Spring boot. También estamos utilizando Spring's Integration (org.springframework.boot:spring-boot-starter-integration).

Cuando intentamos iniciar la aplicación obtenemos:

 *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌──->──┐ | org.springframework.integration.internalPublisherAnnotationBeanPostProcessor └──<-──┘

Pudimos reproducir el problema con una aplicación de arranque Spring limpia:

DemoApplication.java

 package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.integration.config.EnableIntegration; import org.springframework.integration.config.EnablePublisher; @EnableIntegration @EnablePublisher @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }

construir.gradle

 plugins { id 'org.springframework.boot' version '2.6.1' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' }

¿Alguien tiene una pista de lo que podría salir mal? Tal vez falte alguna configuración adicional

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Se ha corregido recientemente: https://github.com/spring-projects/spring-integration/issues/3694 .

Se lanzará la próxima semana para el próximo Spring Boot 2.6.2 .

Como solución alternativa, en lugar de @EnablePublisher , puede agregar este bean:

 @Bean(IntegrationContextUtils.PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME) static PublisherAnnotationBeanPostProcessor publisherAnnotationBeanPostProcessor() { return new PublisherAnnotationBeanPostProcessor() { @Override public void afterPropertiesSet() { } }; }

Es un problema que tiene this.beanFactory.getBean(PublisherAnnotationBeanPostProcessor.class) en su afterPropertiesSet() . Entonces, para mitigar un ciclo, ¡solo necesitamos deshacernos de él!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!