Spring MVC 6.2
Last reviewed Sep 11, 2026
Prompt Details
Prompt Composition
3prompts
- Java 21124 lines · 3.9K tokens
- Spring Boot 3.572 lines · 3.8K tokens
- Spring MVC 6.256 lines · 1.7K tokens
Total252 lines · 9.4K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 93
- 95
- 113
- 117
- 190
- 197
- 201
- 208
- 209
- 295
- 297
- 306
- 307
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 384
- 427
- 444
- 470
- 471
- 488
- 489
- 494
- 502
- 532
- 552
- 601
- 611
- 613
- 639
- 653
- 732
- 749
- 759
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1333
Prompt Preview
Apply the Spring Boot 3.5 baseline first. These rules cover Spring Framework MVC 6.2.19 routing, binding, views, CORS, multipart, and asynchronous request handling.
Routing and binding
- Bind request data to dedicated command objects, not persistence entities, and keep owner, tenant, role, approval state, price, and audit fields absent from the writable model.
- Use
WebDataBinder.setAllowedFieldsandsetDeclarativeBinding(true)for explicit property binding; use@ModelAttribute(binding=false)when an existing object must not be rebound. - Bound nested paths and collections during property binding with
setAutoGrowNestedPaths(false)or a smallsetAutoGrowCollectionLimit; the binder otherwise auto-grows nested paths and defaults to 256 for indexed list/array growth. Bound constructor nesting, maps, and converted collection sizes separately, and keep self-populating lists such asAutoPopulatingListout of bindable objects: theirget(index)creates elements, so a huge index allocates past that limit. - Validate path, query, header, cookie, form, multipart, and JSON values after conversion, including cross-field and authorization invariants.
- Map routes and HTTP methods explicitly and reject unsupported content types before selecting a converter or allocating large request objects.
Authorization and dispatch behavior
- Authorize the resolved object and transition inside the service transaction; a mapped controller, path variable, or successful converter does not prove ownership.
- Cover
REQUEST,ASYNC,ERROR, andFORWARDdispatches in security