Obsolete request mapping format for Spring 7
Reports request patterns in Spring Security matcher methods that are incompatible with the PathPatternParser used by default since Spring Security 7.0.
Spring Security 7.0 switched from Ant-style path matching (AntPathMatcher) to PathPatternParser, which enforces stricter rules for wildcard segments.
The following patterns are flagged:
Wildcard segments (
**or{*variable}) placed in the middle of a pattern rather than at the start or end.More than one wildcard segment (
**or{*variable}) in the same pattern.
Examples of incorrect patterns:
Examples of correct patterns:
This inspection is active only when Spring Security 7.0 or later is present and spring.mvc.pathmatch.matching-strategy is not set to ant_path_matcher.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SpringRequestPatternFormat- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection ID: SpringRequestPatternFormat
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |