7

自定义JSR 注解组合不生效

 2 years ago
source link: https://www.oschina.net/question/2652412_2324884
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

自定义JSR 注解组合不生效

sprouting 发布于 昨天 09:23

事情是这样的,自定义了一些JSR注解,主要是系统自带的有些不符合我们的需求,所以自定义了2个注解,而且可以确定,这2个注解是生效的。-这个已验证

up-31dbb37de8007af49d1e0f3c314f3a5f3cc.png

但现在有这么个需求,先别管合不合理,要求新增的时候验证ID是否存在值,同时验证修改的时候id是否有值,这个时候就需要用到JSR的分组验证功能。通过查阅资料,组合注解这样写就行了

up-0ce96ffbc4efd8461306a107f2bb39bee4e.png

然后使用的时候发现没有触发,这组合注解要怎么写?

up-90b9dafb6097c637d21966465ffaf77df7e.png


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK