by default ValidationExceptionMapper but you can override it implementing
the same mapper and setting in system properties
org.apache.cxf.jaxrs.validation.ValidationExceptionMapper.activated=false


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-21 19:24 GMT+01:00 Steve Goldsmith <[email protected]>:

> Very cool, that works with DTO:
>
> 12/21/2015 13:13:33.577 [http-bio-57592-exec-1] DEBUG
> c.bhn.services.masblaster.OdnService - PostConstruct
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.transId:
> may not be null
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper -
> OdnService.masVersion.arg0.customerGuid: may not be null
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.maxAgeMs:
> may not be null
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Status: 400
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Media type: null
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Headers: {Date=[Mon, 21 Dec 2015
> 18:13:33 GMT]}
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Entity: null
>
> Now, is there a on exception hook in order to control response? I want to
> return the DTO with the warnings.
>
>
> On Mon, Dec 21, 2015 at 12:34 PM, Romain Manni-Bucau <
> [email protected]>
> wrote:
>
> > if your bean can be a CDI bean then it will be and benefit from bean
> > validation-cdi integration:
> >
> >
> >
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
> > works as expected:
> >
> >
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-12-21 18:02 GMT+01:00 sgjava <[email protected]>:
> >
> > > I'm using simple DTOs that are sent from a REST client, where would CDI
> > > come
> > > into play in this scenario? There's no opportunity to @Inject them.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677278.html
> > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > >
> >
>
>
>
> --
> Steven P. Goldsmith
>

Reply via email to