spring-cloud / spring-cloud/spring-cloud-gateway
Add support for Apache BVal
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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