Find Spring Web / WebFlux smells

Proprietary

Controller endpoints worth a closer look: ResponseEntity<T> returns that always emit 200, verb-less @RequestMapping, @RequestMapping(method = [...]) candidates for shortcut annotations, @PathVariable parameters without explicit names, primitive @RequestBody shapes, POST endpoints missing @ResponseStatus(CREATED), and reactive block() calls that stall the event loop.

org.openrewrite.kotlin.spring.FindSpringWebSmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindSpringWebSmells$KtRecipe'

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. Find @RestController methods returning ResponseEntity<T>
  2. Find @RequestMapping(...) without an HTTP method
  3. Find @RequestMapping(method = [RequestMethod.GET]) candidates for @GetMapping
  4. Find @PathVariable parameters without an explicit name
  5. Find @RequestBody on primitive parameters
  6. Find @PostMapping methods missing @ResponseStatus(HttpStatus.CREATED)
  7. Find Mono.block / Flux.blockFirst / Flux.blockLast calls
  8. Find Mono.block() calls in non-test code