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

Add Validator setter in EndpointRegistrar #893

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Add Validator setter in EndpointRegistrar #893

merged 1 commit into from
Oct 4, 2023

Conversation

mt-ocado
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Add Validator setter to EndpointRegistrar that is propagated to the HandlerMethodArgumentResolver instances configured in AbstractListenerAnnotationBeanPostProcessor.

💡 Motivation and Context

Discussed in #854.

Currently, there is no easy way to set up validation for payload in the listener methods. The PayloadMethodArgumentResolver and BatchPayloadMethodArgumentResolver have set null for the validator field which means they never will validate the payload. This change will propagate the Validator set in EndpointRegistrar.

💚 How did you test it?

  • Unit test
  • Manual test

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated reference documentation to reflect the change
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions github-actions bot added component: sqs SQS integration related issue type: documentation Documentation or Samples related issue labels Sep 21, 2023
Copy link
Contributor

@tomazfernandes tomazfernandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @maksym-telepchuk-ocado, looks great, thanks for the PR!

@tomazfernandes tomazfernandes merged commit 2076908 into awspring:main Oct 4, 2023
4 checks passed
@marcussatelis
Copy link

marcussatelis commented Jun 13, 2024

Should have used jakarta.validation.Validator not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sqs SQS integration related issue type: documentation Documentation or Samples related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants