Ask Your Question
1

What is the issue with calling `jakarta.validation.Validation#buildDefaultValidatorFactory`?

asked 2022-11-08 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-04-14 19:00:00 +0000

plato gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-08 11:00:00 +0000

Seen: 20 times

Last updated: Apr 14 '22