ATT.

this case consumer leads to throw

Caused by: java.lang.NoClassDefFoundError: javax/validation/Validation

even while calling no validation method, unless add all validation
dependencies to consumer,

that's not awesome, consumer side check should be activated by consumer
self.

one more question about ValidationFilter:

why the condition check is isNotEmpty:
ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation.getMethodName(),
Constants.VALIDATION_KEY))

and previous version check true or false:
if (invoker.getUrl().getMethodParameter(invocation.getMethodName(),
Constants.VALIDATION_KEY, false))


Below is the reply from @ken.lj:


I think it is reasonable to check validation conditions on consumer side
before params passed to provider side as this can be more efficient. If we
keep it this way, we will meet the problem in your case: all consumers have
to be aware of provider side validation configurations, for example when
provider opened validation check, consumer side have to add necessary
dependencies.

Please, send this problem to dev@dubbo.apache.org, and subscribe to this
email address <https://github.com/alibaba/dubbo/issues/1393>. We can decide
which way to go after a full discussion.

Reply via email to