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

127
Views
Spring Boot 2.6 + Integration - internalPublisherAnnotationBeanPostProcessor circular dependency

We have upgraded to 2.6 Spring boot version. We are also using Spring's Integration (org.springframework.boot:spring-boot-starter-integration).

When we try to start up the application we get:

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

┌──->──┐
|  org.springframework.integration.internalPublisherAnnotationBeanPostProcessor
└──<-──┘

We were able to repro the issue with a clean Spring boot application:

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);
    }

}

build.gradle

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

Does anyone have a hint of what might go wrong? Maybe some additional configuration is missing

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Has been fixed recently: https://github.com/spring-projects/spring-integration/issues/3694.

Will be released next week for upcoming Spring Boot 2.6.2.

As a workaround, instead of @EnablePublisher you can add this bean:

@Bean(IntegrationContextUtils.PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME)
static PublisherAnnotationBeanPostProcessor publisherAnnotationBeanPostProcessor() {
    return new PublisherAnnotationBeanPostProcessor() {

        @Override
        public void afterPropertiesSet() {

        }

    };
}

It's problem that it has that this.beanFactory.getBean(PublisherAnnotationBeanPostProcessor.class) in its afterPropertiesSet(). So, to mitigate a cycle we just need to get rid of it!

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!