When running a static code analysis tool or inspecting/analyzing your code from your IDE, you may have encountered the following warning regarding your @Autowired fields: Field injection is not recommended. This post shows the alternatives to field injection and how to avoid this warning.