Skip to content

Provide a configuration property for MethodValidationPostProcessor's adaptConstraintViolations #43881

@Romster

Description

@Romster

Spring documentation describes the way how to make an application raise MethodValidationException instead of ConstraintViolationException by declaring a bean

         @Bean
	public static MethodValidationPostProcessor validationPostProcessor() {
		MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
		processor.setAdaptConstraintViolations(true);
		return processor;
	}

It would be great to have a dedicated property used in org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration#methodValidationPostProcessor to change this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions