1 | initial version |
The issue with calling jakarta.validation.Validation#buildDefaultValidatorFactory
is that it creates a new instance of ValidatorFactory
every time it is called. This can be inefficient and slow down the application, especially if the method is called frequently. It is better to create a single instance of ValidatorFactory
and reuse it throughout the application.