java - Spring MVC Validation of Inherited Classes -
I believe I'm the only one who wants to do this, but I'm not getting any reference to my obstacle Use Spring MVC and annotation-based verification to help me above (I'm using Framework 4.0 and Java 1.7), consider a simple class hierarchy as follows:
Abstract square fu {@ size (max = 10, message = "name must be 10 characters or less. ") The name of the private string; Public string getName () {this.name; } Public Zero Setname (string name) {this.name = name; }} Square Bar Expands Fu {} Class Bang Phu {}
If I have put Name in a bar, in the example of Bar or Bang I have more than 10 characters, I get the expected error. I suppose, though, I think that bar and bang are still to be obtained from the abstract base class fu, but that I have the name attribute of the hair sections < Em> different assumptions.
How can I explain the bar and the bang so that the bar.name is the maximum length, 12 characters plus Bang.name the maximum length of 8 characters is?
Thank you very much, Rob
The short answer is that it is not possible Bean recognition to disable obstacles in superclasses. Here is a feature request that is suggesting the introduction of annotations of @OverrideConstraint or @IgnoreInheritedConstraint. It is not possible to do so by now.
Also see and
Comments
Post a Comment