阅读背景:

春天的验证者应该访问数据库吗?

来源:互联网 

I'm not really sure if it's a good design decision to make the validators validate commands based on the state of the database. For example if I need to validate a User bean besides checking if the email and username are empty etc. I also need to reject values if they are already used. Should this kind of logic go in the validators or the service objects?I'm not really sure if it's a good design decis




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: