Inspectopedia
 
2024.3

Non recommended 'field' injections

Info
New
Last modified: 03 December 2024

Reports injected or autowired fields in Spring components.

The quick-fix suggests the recommended constructor-based dependency injection in beans and assertions for mandatory fields.

Example:

After applying the quick-fix: