Inspectopedia 2026.1 Help

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:

http.authorizeHttpRequests(auth -> auth .requestMatchers("/api/**/admin").permitAll() // '**' in the middle .requestMatchers("/{*a}/{*b}").permitAll() // multiple {*...} segments );

Examples of correct patterns:

http.authorizeHttpRequests(auth -> auth .requestMatchers("/api/admin/**").permitAll() // '**' at the end .requestMatchers("/{*path}").permitAll() // single {*...} segment .requestMatchers("/api/*/details").permitAll() // single '*' is fine anywhere );

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.

Settings or Preferences | Editor | Inspections | Spring | Spring Security

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:

//noinspection SpringRequestPatternFormat

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:

IntelliJ IDEA 2026.1, Qodana for JVM 2026.1,

Last modified: 31 March 2026