Adam Bien's Weblog

Java EE 7: JAX-RS 2.0 and Bean Validation [Screencast]

Bean Validation 1.1 is well integrated with JAX-RS 2.0--verifying input of a JAX-RS 2.0 resource can be implemented in a few minutes:

Prepare your questions—I will attempt to answer them…live. See you soon!

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Hi Adam,

Thanks for covering Bean Validation and its integration with JAX-RS; Very glad to hear you like it :)

One thing though: the resolution of the screen cast is rather low, which makes it hard to read the text in the IDE. Maybe you could produce the videos with a higher resolution?

--Gunnar

Posted by Gunnar on April 30, 2014 at 02:22 PM CEST #

Thanks for all of your education tutorials!

I have two questions about the "message" part of the bean validation constraint.
A) How is it possible to get practical use of it beside of unit testing?

B) In case of an age of 17 a BeanValidationException is thrown, but the message "only adults" won't be distributed! Is there something more to annotate or to configure?

Best regards Thomas

@Entity
class Person{

@Min(18, message="only adults")
@Max(120, message="you must be dead")
byte age;

}

Posted by Thomas on February 03, 2015 at 03:59 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License