spring-cloud / spring-cloud/spring-cloud-gateway

Add support for Apache BVal

Open
#2,303 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

waiting for votes
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

This and this annotations lead to startup errors in case Hibernate Validator, pulled by spring-boot-starter-validation, is replaced by a different JSR 303 implementation as Apache BVal.

@Max does not look as meant to support DataSize anyway: https://github.com/eclipse-ee4j/beanvalidation-api/blob/master/src/main/java/jakarta/validation/constraints/Max.java#L31-L36

Would it be possible to either remove those two annotations, or to supply a dedicated validator for DataSize as in the sample shown by https://stackoverflow.com/questions/60526871/annotation-for-datasize-validation#answer-60528256 ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two annotations in spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/HttpClientProperties.java at lines 100 and 109. Reproduce the startup error with Hibernate Validator replaced by Apache BVal, then determine whether removing the annotations or providing a DataSize validator resolves it. Verify that the gateway starts successfully with the alternate JSR 303 implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.