Skip to content

Document that @Validated results in the use of a proxy and warn users about the side-effects #24338

@wilkinsona

Description

@wilkinsona

Affects: All supported versions

Using @Validated can result in a CGLib proxy being created for a bean. This has the sometimes unexpected side-effect of changing how the bean's fields behave when accessed directly. Please see this Spring Boot issue for an example of a problem that this unexpected behavior can cause.

I think it would be good if the Framework reference documentation noted the use of a proxy and forewarned users about the side-effects.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: documentationA documentation task

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions