Skip to content

Fix AMQP autoconfig on Spring Boot 4.1 / Spring AMQP 4.1 - #115

Merged
rammrain merged 1 commit into
masterfrom
fix/112
Jul 28, 2026
Merged

rammrain merged 1 commit into
masterfrom
fix/112

Conversation

@rammrain

Copy link
Copy Markdown
Member

Closes #112.

Problem

ee.bitweb:spring-core:5.0.0 fails at application-context load under Spring Boot 4.1.0 / Spring AMQP 4.1.0:

BeanCreationException: bean "rabbitListenerContainerFactory" in ee/bitweb/core/amqp/AmqpAutoConfiguration.class
  → factory method "jsaFactory" threw:
    NoClassDefFoundError: org/springframework/amqp/rabbit/listener/ConditionalRejectingErrorHandler$DefaultExceptionStrategy

Spring AMQP 4.1 relocated ConditionalRejectingErrorHandler and FatalExceptionStrategy from org.springframework.amqp.rabbit.listener to org.springframework.amqp.listener. The old types are deprecated forRemoval and the nested DefaultExceptionStrategy no longer resolves at the old coordinates, so a library compiled against them throws at runtime. The new package does not exist in Spring AMQP 4.0.x, so the fix requires a Boot 4.1 baseline.

Changes

  • AMQP import relocation — point the two relocated types at org.springframework.amqp.listener in:
    • CoreExceptionStrategy
    • AmqpAutoConfiguration
    • AmqpTraceAwareExceptionHandler (both ConditionalRejectingErrorHandler and FatalExceptionStrategy)
    • TraceIdAmqpAutoConfiguration
  • Dependency baseline — all Spring Boot deps 4.0.6 → 4.1.0; spring-webmvc / spring-tx 7.0.7 → 7.0.8 (the Spring Framework version Boot 4.1.0 manages).
  • FieldNameResolver migration — the 4.1.0 bump pulls hibernate-validator 9.1.0, which removed the internal NodeImpl / PathImpl / ConstraintViolationImpl types this class relied on. Migrated to the public jakarta.validation.Path / Path.Node API (getName/getKind/getIndex/isInIterable). Behavior preserving.
  • Version5.0.0 → 5.1.0.

Breaking change

This release drops support for Spring Boot 4.0.x — the relocated AMQP package does not exist there. Consumers must be on Spring Boot 4.1+.

@sonarqubecloud

Copy link
Copy Markdown

@rammrain
rammrain marked this pull request as ready for review July 24, 2026 11:00
@rammrain
rammrain requested a review from a team as a code owner July 24, 2026 11:00
@rammrain
rammrain merged commit 1b1ea8f into master Jul 28, 2026
12 checks passed
@rammrain
rammrain deleted the fix/112 branch July 28, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AMQP autoconfig breaks on Spring Boot 4.1 / Spring AMQP 4.1 (ConditionalRejectingErrorHandler.DefaultExceptionStrategy removed)

1 participant