Skip to content

CacheAspectSupport initialization failure should throw dedicated exceptions, rather than IllegalStateException #22442

@snicoll

Description

@snicoll

CacheAspectSupport has two throw clause with IllegalStateException that represents a user-facing configuration problem. It would be nice to adapt them so that we provide additional context and information.

I wonder if re-throwing NoUniqueBeanDefinitionException and NoSuchBeanDefinitionException with extra semantic would be an option.

The plan is to add a FailureAnalyzer without having to write too much code since these low-level exceptions are already handled.

See spring-projects/spring-boot#13348 for more context.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions