Thanks for your insight, Matt.

I linked your reply from

https://github.com/spring-cloud/spring-cloud-gateway/pull/2389#issuecomment-1007445164

Regards.

On 07/01/22 15:21, Matt Benson wrote:
It looks to me as though this is an implementation-specific feature of 
Hibernate Validator [1]. The BV specification v2.0 makes no mention of loading 
constraint validators from META-INF/services.

Matt

[1] 
https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#_constraint_definitions_via_code_serviceloader_code
 
<https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#_constraint_definitions_via_code_serviceloader_code>

On Fri, Jan 7, 2022 at 1:27 AM Francesco Chicchiriccò <[email protected] 
<mailto:[email protected]>> wrote:

    Hi,
    at Syncope we are having troubles while making Spring Cloud Gateway 3.1.0 
working with BVal 2.0.5 (rather than Hibernate Validator, which seems to be 
their default).

    Essentially, the issue is with this annotation [1] leading to startup 
errors like as [2].

    I have reached out to the Spring Cloud Gateway project, and they are 
claiming [3] the issue being on BVal not correctly loading their 
META-INF/services/javax.validation.ConstraintValidator [4].

    Can you shed some light? Is it actually a bug on BVal or some kind of 
misconfiguration on their side?

    TIA.
    Regards.

    [1] 
https://github.com/spring-cloud/spring-cloud-gateway/blob/v3.1.0/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/HttpClientProperties.java#L100
 
<https://github.com/spring-cloud/spring-cloud-gateway/blob/v3.1.0/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/HttpClientProperties.java#L100>
    [2] 
https://github.com/spring-cloud/spring-cloud-gateway/pull/2389#issuecomment-1006773344
 
<https://github.com/spring-cloud/spring-cloud-gateway/pull/2389#issuecomment-1006773344>
    [3] 
https://github.com/spring-cloud/spring-cloud-gateway/pull/2389#issuecomment-1006781216
 
<https://github.com/spring-cloud/spring-cloud-gateway/pull/2389#issuecomment-1006781216>
    [4] 
https://github.com/spring-cloud/spring-cloud-gateway/blob/v3.1.0/spring-cloud-gateway-server/src/main/resources/META-INF/services/javax.validation.ConstraintValidator
 
<https://github.com/spring-cloud/spring-cloud-gateway/blob/v3.1.0/spring-cloud-gateway-server/src/main/resources/META-INF/services/javax.validation.ConstraintValidator>

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to