Spring WebFlux 7.0
Last reviewed Sep 25, 2026
Prompt Details
Prompt Composition
4prompts
- Java 25113 lines · 2.8K tokens
- Spring Framework 7.070 lines · 2.4K tokens
- Spring Boot 4.162 lines · 2.7K tokens
- Spring WebFlux 7.078 lines · 3.5K tokens
Total323 lines · 11.4K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 116
- 117
- 190
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 306
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 384
- 409
- 427
- 470
- 471
- 488
- 494
- 502
- 524
- 532
- 552
- 611
- 613
- 614
- 653
- 681
- 732
- 749
- 770
- 772
- 776
- 789
- 807
- 829
- 862
- 863
- 913
- 915
- 916
- 918
- 922
- 942
- 1275
- 1333
Prompt Preview
Apply the Spring Boot 4.1 and Java 25 prompts first. These rules cover Spring Framework 7.0.9 WebFlux controllers, functional endpoints, codecs, WebClient, sessions, and streaming. The framework retains a Java 17 minimum; these rules target Java 25.
Routing and binding
- Constrain
@ModelAttributeandServerRequest.bindwith dedicated input types andWebDataBinder.setDeclarativeBinding(true); explicitly allowlist setter-bound fields withsetAllowedFieldswhere needed. These binder settings do not restrict JSON deserialization through@RequestBody. - Authorize resource and tenant identifiers from the intended input source independently of bound model fields:
@ModelAttributecombines form data, query parameters, URI variables, and headers, with form and query values taking precedence over matching URI variables or headers. - Apply
@Validor@Validatedto annotated command objects and explicit constraints to scalar parameters. Check an adjacentErrorsorBindingResultbefore doing work; declaring one can transfer validation-error handling to the controller. - Handle both
WebExchangeBindExceptionandHandlerMethodValidationException;@Validalone does not activate method validation. Remove class-level@Validatedwhen relying on WebFlux's built-in controller method validation instead of AOP validation. - Invoke a configured
Validatorexplicitly in functional handlers afterbodyToMonoor for eachbodyToFluxelement, before persistence or other side effects; decoding a DTO does not itself enforce its Bean Validation constraints. - Declare