Тёмный

How to Validate Data in Quarkus with Bean Validations 

Modus Create, LLC
Подписаться 10 тыс.
Просмотров 3,4 тыс.
50% 1

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@MJSkavioke
@MJSkavioke Год назад
Nice video. I was wondering if there is also something like the @DateTimeFormat annotation that Spring has, without having to write a custom validator for this. If I now enter a wrong date format that cannot be parsed into a LocalDate, Quarkus returns a 404 NotFound, whereas I would expect a 400 BadRequest.
@andersonbernardo3532
@andersonbernardo3532 3 года назад
Nice way to customize validators! Even I feeling lack of the power from Spring Annotations to make it more easier and less verbose, than implementing a "custom annotation" and a "custom processor" to handle "fixed field names" (field names could be sent through annotation parameter maybe?)
@wesleyfuchter2543
@wesleyfuchter2543 3 года назад
Thanks for the feedback. Yes, indeed spring is well known by having much less verbose abstractions. In the other hand, it uses JavaX Validation API as default validation tool. Using field validations the validator receives the actual field value, but in this example I needed to use it on class level in order to have a composite validation (social security number and issued state).
@hericlesweber3021
@hericlesweber3021 3 года назад
Nice tips
@thulasivakati6147
@thulasivakati6147 2 года назад
Hi - I am getting error while defining validatorContext as - Cannot use 'var' on variable without initializer -HibernateConstraintValidatorContext cannot be resolved to a variable Syntax error on token ":", ; expected Can you please let me know what should be the fix
@wesleyfuchter2543
@wesleyfuchter2543 2 года назад
Hey there! The first problem it comes to my mind is your JDK. In order to use the `var` keyword you need to be running JDK 10 or above. Could you review that? Feel free to keep the conversation going here if that doesn't solve your issue. Thank you for watching for the feedback.
Далее
Solving one of PostgreSQL's biggest weaknesses.
17:12
Просмотров 205 тыс.
1 Subscriber = 1 Penny
00:17
Просмотров 46 млн
RESTEasy Reactive in Quarkus
9:11
Просмотров 12 тыс.
How to Use Epics, Components, and Labels in Jira
2:28