Migrate deprecated APIs removed in Spring Framework 7.0

Proprietary

Migrates deprecated APIs that were removed in Spring Framework 7.0. This includes ContentCachingRequestWrapper constructor changes, CookieLocaleResolver cookie name and max age configuration, NoResourceFoundException constructor changes, and NestedServletException to ServletException type migration.

io.moderne.java.spring.framework7.MigrateDeprecatedAPIs
mod run . --recipe=io.moderne.java.spring.framework7.MigrateDeprecatedAPIs

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. Migrate CookieLocaleResolver#setCookieName(String) to the constructor
  2. Migrate CookieLocaleResolver#setCookieMaxAge(Integer) to Duration
  3. Add a literal method argument 1 in methods org.springframework.web.util.ContentCachingRequestWrapper <constructor>(jakarta.servlet.http.HttpServletRequest)
  4. Migrate NoResourceFoundException constructor for Spring Framework 7.0
  5. Migrate removed LastModified support
  6. Change type NestedServletException to ServletException