java:S3749 'Members of Spring components should be injected' must be extended for Spring 3


using Sonarqube Enterprise 9.9.0 with sonar-java-plugin-

This raises an issue for java:S3749 ‘Members of Spring components should be injected’

import jakarta.annotation.Resource;
private RequestData requestData;

Even the latest version of Sonar Java, see


This rule raises an issue when a singleton @Component, @Controller, @Service, or @Repository, not annotated with @ConfigurationProperties, has non-static members that are not annotated with one of:

  • javax.annotation.Resource

But with Spring 3 it’s jakarta.annotation.Resource. instead of javax.annotation.Resource

The Spring boot 3 release notes mention the use of Jakarta EE 9 (jakarta) instead of JEE (javax)


If you are trying an existing application with Spring Boot 3.0 you’ll need to be aware that we’ve migrated all Java EE APIs to their equivalent Jakarta EE variant.


1 Like

Hey Gilbert, thank you for the report.
We are aware that many classes were migrated to Jakarta packages, and we have some tickets to update our analyzers with this information.

I created a specific ticket for this one as you provided plenty of useful details.

Have a nice day!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.