Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. protected AppDescriptor configure() {
  2. ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
  3. ResourceConfig config = new PackagesResourceConfig("com.yourcompany.packages", "org.codehaus.jackson.jaxrs");
  4. config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
  5. config.getSingletons().add(new SpringComponentProviderFactory(config, applicationContext) );
  6. LowLevelAppDescriptor appDescriptor = new LowLevelAppDescriptor.Builder(config).build();
  7. return appDescriptor;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement