Develop the Data Transfer Object
We'll cover the following
We will divide the user interface development into the following three tasks:
- The data transfer object
- The mock service
- The mock user interface
We will look at each of these tasks one by one.
Data transfer object
The data transfer object contains ProtocolDto
which has an identifier and a name. There are two subtypes of ProtocolDto
known as TCPDto
and SNMPDto
. The @JsonTypeInfo
annotation is used to denote Polymorphic types i.e., the ability of an object to take on many forms and, the kind of metadata used for serializing and deserializing type information. The @JsonSubTypes
annotation is used to denote sub-types of serializable polymorphic types.
Get hands-on with 1400+ tech skills courses.