Replace @Controller with @RestController

Proprietary

When a class is annotated with @Controller and either the class itself or all of its handler methods are annotated with @ResponseBody, the class can use @RestController instead. This removes the need for individual @ResponseBody annotations.

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

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