Replace String literals with HttpHeaders constants

MSAL

Replace String literals with org.springframework.http.HttpHeaders constants in modules that depend on spring-web.

org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants
mod run . --recipe=org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants

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. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT
  2. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT_CHARSET
  3. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT_ENCODING
  4. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT_LANGUAGE
  5. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT_PATCH
  6. Replace String literal with constant org.springframework.http.HttpHeaders.ACCEPT_RANGES
  7. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS
  8. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS
  9. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS
  10. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN
  11. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS
  12. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_MAX_AGE
  13. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS
  14. Replace String literal with constant org.springframework.http.HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD
  15. Replace String literal with constant org.springframework.http.HttpHeaders.AGE
  16. Replace String literal with constant org.springframework.http.HttpHeaders.ALLOW
  17. Replace String literal with constant org.springframework.http.HttpHeaders.AUTHORIZATION
  18. Replace String literal with constant org.springframework.http.HttpHeaders.CACHE_CONTROL
  19. Replace String literal with constant org.springframework.http.HttpHeaders.CONNECTION
  20. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_ENCODING
  21. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_DISPOSITION
  22. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_LANGUAGE
  23. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_LENGTH
  24. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_LOCATION
  25. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_RANGE
  26. Replace String literal with constant org.springframework.http.HttpHeaders.CONTENT_TYPE
  27. Replace String literal with constant org.springframework.http.HttpHeaders.COOKIE
  28. Replace String literal with constant org.springframework.http.HttpHeaders.DATE
  29. Replace String literal with constant org.springframework.http.HttpHeaders.ETAG
  30. Replace String literal with constant org.springframework.http.HttpHeaders.EXPECT
  31. Replace String literal with constant org.springframework.http.HttpHeaders.EXPIRES
  32. Replace String literal with constant org.springframework.http.HttpHeaders.FROM
  33. Replace String literal with constant org.springframework.http.HttpHeaders.HOST
  34. Replace String literal with constant org.springframework.http.HttpHeaders.IF_MATCH
  35. Replace String literal with constant org.springframework.http.HttpHeaders.IF_MODIFIED_SINCE
  36. Replace String literal with constant org.springframework.http.HttpHeaders.IF_NONE_MATCH
  37. Replace String literal with constant org.springframework.http.HttpHeaders.IF_RANGE
  38. Replace String literal with constant org.springframework.http.HttpHeaders.IF_UNMODIFIED_SINCE
  39. Replace String literal with constant org.springframework.http.HttpHeaders.LAST_MODIFIED
  40. Replace String literal with constant org.springframework.http.HttpHeaders.LINK
  41. Replace String literal with constant org.springframework.http.HttpHeaders.LOCATION
  42. Replace String literal with constant org.springframework.http.HttpHeaders.MAX_FORWARDS
  43. Replace String literal with constant org.springframework.http.HttpHeaders.ORIGIN
  44. Replace String literal with constant org.springframework.http.HttpHeaders.PRAGMA
  45. Replace String literal with constant org.springframework.http.HttpHeaders.PROXY_AUTHENTICATE
  46. Replace String literal with constant org.springframework.http.HttpHeaders.PROXY_AUTHORIZATION
  47. Replace String literal with constant org.springframework.http.HttpHeaders.RANGE
  48. Replace String literal with constant org.springframework.http.HttpHeaders.REFERER
  49. Replace String literal with constant org.springframework.http.HttpHeaders.RETRY_AFTER
  50. Replace String literal with constant org.springframework.http.HttpHeaders.SERVER
  51. Replace String literal with constant org.springframework.http.HttpHeaders.SET_COOKIE
  52. Replace String literal with constant org.springframework.http.HttpHeaders.SET_COOKIE2
  53. Replace String literal with constant org.springframework.http.HttpHeaders.TE
  54. Replace String literal with constant org.springframework.http.HttpHeaders.TRAILER
  55. Replace String literal with constant org.springframework.http.HttpHeaders.TRANSFER_ENCODING
  56. Replace String literal with constant org.springframework.http.HttpHeaders.UPGRADE
  57. Replace String literal with constant org.springframework.http.HttpHeaders.USER_AGENT
  58. Replace String literal with constant org.springframework.http.HttpHeaders.VARY
  59. Replace String literal with constant org.springframework.http.HttpHeaders.VIA
  60. Replace String literal with constant org.springframework.http.HttpHeaders.WARNING
  61. Replace String literal with constant org.springframework.http.HttpHeaders.WWW_AUTHENTICATE