Preserve Jackson 2 enum serialization when upgrading to Spring Boot 4.0

Proprietary

Jackson 3, which Spring Boot 4 uses by default, writes and reads enums using toString() instead of name(). For enums that override toString(), such as HttpStatus, this changes the JSON form: HttpStatus.OK is serialized as "200 OK" instead of "OK", and "OK" can no longer be read. Add spring.jackson.datatype.enum.write-enums-using-to-string=false and spring.jackson.datatype.enum.read-enums-using-to-string=false to existing Spring configuration files of applications using Jackson with a Spring Boot version before 4.0 to preserve the previous behavior. Explicit configuration is retained.

io.moderne.java.spring.boot4.PreserveJackson2EnumSerialization
mod run . --recipe=io.moderne.java.spring.boot4.PreserveJackson2EnumSerialization

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