• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Hibernate Validator with XML declaration and Spring configuration in a Maven project

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is it possible to use Hibernate Validator for validating Hibernate domain objects, having the validation parameters be specified declaratively in XML instead of using annotations, and perhaps using Spring to initialize/configure Hibernate Validator?
I generate the Hibernate mappings and domain classes, so I do not want to add annotations to them.
I already know Hibernate Validator 4 supports XML declaration of validation parameters, but it seems this is still in Beta phase? Anyway I could not find the correct maven dependencies for a stable version.
I also found a way to configure Hibernate Validator in Spring by adding a validation event listener bean to the applicationcontext.xml. However, that particular class could not be found so again, I need the correct dependencies.

If the above is possible, can somebody help me get started with the correct dependencies, and Java code or Spring configuration to initialize/execute validation?

Cheers,
Kjeld


 
My pie came with a little toothpic holding up this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic