posted 12 years ago
Hi Everyone,
With Thanks to Rossen Stoyanchev I have this working.
In short the problem is to do with standloneSetup with does not load spring configuration.
One option is to create a LocalValidatorFactoryBean configured with a SpringConstraintValidatorFactory and plug it into the standaloneSetup builder.
However I decided to migrate from spring-test-mvc to spring-test in 3.2.
All that was required was to annotate my test class with @WebAppConfiguration, load in my spring configuration files with @ContextConfiguration and then @Autowired WebApplicationContext
Example
I can now @Autowire services in my custom jsr annotation validator.
Hope this helps others
Regards
Darren C.