ILimitStructureValidator, ILimitValidator, and IIncidentValidator interfaces, respectively.
Here’s how to do this:
1. Create the Spring Bean(s)
These interfaces provide the explicit type parameter for the generically-typedIValidator interface:
ILimitValidator could look like this:
Note that the
hasErrors method is not overridden in the custom validator. The default implementation of this method in IValidator is sufficient for most use cases.