You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "zuihou (via GitHub)" <gi...@apache.org> on 2025/04/27 14:32:29 UTC

Re: [I] springboot3 开启validation检验 报错 springboot3适配问题 [dubbo]

zuihou commented on issue #12426:
URL: https://github.com/apache/dubbo/issues/12426#issuecomment-2833487979

   > 可以试试进行全局配置 dubbo.consumer.validation=jvalidationNew 或者在注解中加入validation值为jvalidationNew
   
   请问如何全局配置 jvalidationNew ?
   
   
   使用 @DubboService(validation = "jvalidationNew") 有效,
   
   ```
   // 生效
   @DubboService(validation = "jvalidationNew")
   public class OpenPaymentImpl implements OpenPayment {
   }
   ```
   
   
   但若只配置 dubbo.consumer.validation=jvalidationNew  ,  @DubboService() 不设置validation 则不生效。
   ```
   // application.properties
   dubbo.consumer.validation=jvalidationNew  
   
   
   // 执行校验,但调用里面的方法会报错(和1楼的错误一样)
   @DubboService(validation = "true")
   public class OpenPaymentImpl implements OpenPayment {
   }
   // 无法执行校验,但调用里面的方法不会报错
   @DubboService
   public class OpenPaymentImpl implements OpenPayment {
   }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org