Migrate deprecated path mapping options

Proprietary

Migrates deprecated path mapping configuration options that have been removed in Spring Framework 7.0. For trailing slash matching, this recipe adds explicit dual routes to controller methods before removing the deprecated configuration. For suffix pattern matching, this recipe flags usages for manual review since there is no automatic migration path. Path extension content negotiation options are removed as they should be replaced with query parameter-based negotiation.

io.moderne.java.spring.framework.RemoveDeprecatedPathMappingOptions
mod run . --recipe=io.moderne.java.spring.framework.RemoveDeprecatedPathMappingOptions

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Register a UrlHandlerFilter to preserve trailing slash matching
  2. Remove method invocations org.springframework.web.servlet.config.annotation.PathMatchConfigurer setUseTrailingSlashMatch(java.lang.Boolean)
  3. Remove method invocations org.springframework.web.reactive.config.PathMatchConfigurer setUseTrailingSlashMatch(java.lang.Boolean)
  4. Remove RequestMappingHandlerMapping path options that restate the default
  5. Flag deprecated suffix pattern matching usage for manual review
  6. Remove method invocations org.springframework.web.accept.ContentNegotiationManagerFactoryBean setFavorPathExtension(boolean)
  7. Remove method invocations org.springframework.web.accept.ContentNegotiationManagerFactoryBean setIgnoreUnknownPathExtensions(boolean)
  8. Remove method invocations org.springframework.web.util.pattern.PathPatternParser setMatchOptionalTrailingSeparator(boolean)
  9. Remove empty path match configuration methods