Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain support for legacy JSR-250 javax.annotation.PostConstruct/PreDestroy and JSR-330 javax.inject.Inject in addition to Jakarta EE 9 annotations #27444

Closed
mp911de opened this issue Sep 21, 2021 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Sep 21, 2021

After migration to Jakarta EE 9, it's easy to miss that javax.annotation.PostConstruct or javax.inject.Inject are no longer working when not covered by a test. This can be an easy-to-make bug when these annotations reside on the classpath after migrating to Jakarta EE 9.

It would be neat to support both annotation variants for at least a grace period or to fail fast when these annotations are in use.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 21, 2021
@jhoeller jhoeller self-assigned this Sep 21, 2021
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 21, 2021
@jhoeller jhoeller added this to the 6.0 M1 milestone Sep 21, 2021
@jhoeller jhoeller changed the title Consider support for legacy JSR-250 and JSR-330 annotations in addition to Jakarta EE 9 annotations Retain support for legacy JSR-250 javax.annotation.PostConstruct/PreDestroy and JSR-330 javax.inject.Inject in addition to Jakarta EE 9 annotations Sep 21, 2021
@mdeinum
Copy link
Contributor

mdeinum commented Sep 22, 2021

Would it make sense to, next to retain support, log a warning if the legacy JSR-250 annotations are detected? As to warning/incentive to the user to migrate to the Jakarta annotations?

@sbrannen sbrannen changed the title Retain support for legacy JSR-250 javax.annotation.PostConstruct/PreDestroy and JSR-330 javax.inject.Inject in addition to Jakarta EE 9 annotations Retain support for legacy JSR-250 javax.annotation.PostConstruct/PreDestroy and JSR-330 javax.inject.Inject in addition to Jakarta EE 9 annotations Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants