Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Test
  2. public void it_can_load_the_prod_config() throws IOException, ConfigurationException {
  3. ValidatorFactory validatorFactory = Validation
  4. .byProvider(HibernateValidator.class)
  5. .configure()
  6. .addValidatedValueHandler(new OptionalValidatedValueUnwrapper())
  7. .buildValidatorFactory();
  8.  
  9. ConfigurationFactory<Config> factory =
  10. new DefaultConfigurationFactoryFactory<Config>().create(Config.class, validatorFactory.getValidator(),
  11. Jackson.newObjectMapper(), "dw");
  12.  
  13. factory.build(new File("src/main/resources/prod_configuration.yml"));
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement