Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Valiation for Rest Apis #3

Open
dev-kemblekaran opened this issue Mar 15, 2021 · 2 comments
Open

Request Valiation for Rest Apis #3

dev-kemblekaran opened this issue Mar 15, 2021 · 2 comments

Comments

@dev-kemblekaran
Copy link

dev-kemblekaran commented Mar 15, 2021

Currently validations on beans do not work. I tried to add @Valid annotation on CrudController but is not working. Also tried overriding the methods and provide validation implementation in the specific controller but that also not working.

would like to have following to perform validations for the apis

    @PostMapping
    public Long create(@RequestBody **@Valid** DTO dto) {
        return facade.create(dto);
    }
@Nemanja-Majstorovic-To
Copy link

Nemanja-Majstorovic-To commented Apr 20, 2021

Have you tried using @Validated? Ref
I'm going to start implementing this code tomorrow

@Nemanja-Majstorovic-To
Copy link

I confirm that with @Validated it works fine. It's still a Work In Progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants