Skip to content

Validations And Quick Fixes

Martin Lippert edited this page Dec 7, 2022 · 3 revisions

Spring-Specific Validations (new in 4.17.0 / 1.41.0)

The new version of the Spring Tools 4.17.0 (and the corresponding extensions for VSCode in version 1.41.0) introduces support for a number of Spring specific validations and corresponding quick fixes.

Examples for those validations are:

  • field injections (using @Autowired on a field) where constructor parameters should be used instead
  • useless @Autowired annotations on constructors that could be removed
  • the usage of @RequestMapping where specific mapping annotations like @GetMapping should be used instead

Please take a look at the preferences to see the full list of validations that the tools provide.

Preferences

Since the validations are often related to specific styles or recommendations how to use Spring, they do not necessarily point to real problems or errors. Therefore, you can define the severity of each of these validations individually in the preferences. You can change those preferences to choose the right level for your case - or turn every validation to IGNORE if you don't want to see any those validations to appear.

Clone this wiki locally