on ‎2018 Dec 13 10:20 AM
I need to annotation the DTO attribute in xxx-beans.xml with some XmlElement annotation.But i also want to add @NotNull annotation to the attribute for validation later on.But the property attribute only support one annotation
<annotations> </annotations>
The beans.xsd only support one annotations for attribute.Does any one know how to add multiple annotations during bean generation?
Request clarification before answering.
There can be up to 3 annotations. Please check the following:
<xs:complexType name="property">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="hints" type="hints" minOccurs="0" maxOccurs="1"/>
<xs:element name="annotations" type="annotations" minOccurs="0" maxOccurs="3"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="equals" type="xs:boolean" use="optional" />
<xs:attribute name="deprecated" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Marks property as deprecated. Allows defining a message.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.