1、給Bean新增校驗註解,一般是在 javax.validation.constraints 這個包下,也還有一些是 hibernate 提供的。 2、開啟校驗功能@Valid。 3、當校驗失敗的 ...
確定! 回上一頁