Skip to content

Reinstate support for legacy JSR-250 @javax.annotation.ManagedBean and JSR-330 @javax.inject.Named annotations #36201

@YSavanier

Description

@YSavanier

Overview

As asked, this is a copy paste of #33345.

This regression is done again in version 7: 949432c.

Original Text

With the migration to Jakarta annotations in 7.0, we switched to supporting @jakarta.annotation.ManagedBean and @jakarta.inject.Named annotations for component scanning and component name lookups.

To better assist projects in the migration to Spring 6+ and 7+, we should reinstate support for the legacy JSR-250 @javax.annotation.ManagedBean and JSR-330 @javax.inject.Named annotations so that existing compiled code will continue to work as expected.

Deliverables

  • Support @javax.annotation.ManagedBean and @javax.inject.Named in ClassPathScanningCandidateComponentProvider#registerDefaultFilters(...).
  • Support @javax.annotation.ManagedBean and @javax.inject.Named in AnnotationBeanNameGenerator#isStereotypeWithNameValue(...).
  • Update tests.
  • Update Javadoc.

Related Issues

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applystatus: feedback-providedFeedback has been provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions