The big pit encountered by Java @Validated

I use @Validated in two methods in a Controller. This is the method that the two POST methods will enter. The names of the entity classes of these two methods (the content of the red box in the figure below) cannot be the same. If they are the same, it will lead to The second one cannot display the error message on the page (the first one can be displayed normally). The names of 1 and 3 in the following figure cannot be the same, and the names of 2 and 4 cannot be the same. When the same situation occurs, the page will not display properly. error message

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324877944&siteId=291194637