spring-web 6.0.9
i just upgrade spring boot from 2.4.10 to 3.0.7. then spring-boot-starter-web auto upgrade from 5.3.9 to 6.0.9.
it have some compile error. i have fixed refer to the official document, but unfortunately all my spring bean cannot inject.
it make me annoy. in order to confirm the reason, i downgrade the springboot version to 2.4.10, and it works.
could someone help me?
see my snapshot upgrade version:
downgrade version:
Comment From: bclozel
Questions should be asked on Stack Overflow.
Could you ask this on StackOverflow? From the description of your problem it looks like a configuration error is likely.
Please provide a minimal sample application and a detailed stack trace on the StackOverflow question so we can help you.
Comment From: nzb15555196162
I have fixed this issue since our previous version was using @javax.annotation.Resource
.
After the upgrade, this annotation can no longer be used for dependency injection. Instead, we now need to use @jakarta.annotation.Resource
.
My question is why can't spring-web be compatible with this problem at the framework level?
Our business system is widely dependent on Spring. Although this is a small problem, it is a very important annotation for dependency injection.
My suggestion is that it is best to be compatible at the framework level, which is more friendly to Spring users.
Comment From: sbrannen
This request is analogous to #27444.
Since we opted to reinstate support for javax.annotation.PostConstruct
and javax.annotation.PreDestroy
, I think it is worth considering reinstating support for javax.annotation.Resource
alongside jakarta.annotation.Resource
in CommonAnnotationBeanPostProcessor
.
In light of that I am reopening this issue and changing its title.
Comment From: nzb15555196162
Understood, thank you