Skip to content

Instantly share code, notes, and snippets.

@andyczerwonka
Last active December 26, 2015 17:05
Show Gist options
  • Save andyczerwonka/36db2247704c226f81b8 to your computer and use it in GitHub Desktop.
Save andyczerwonka/36db2247704c226f81b8 to your computer and use it in GitHub Desktop.
This configures the Jersey service for the unit tests
@Override
protected DeploymentContext configureDeployment() {
Map<String, String> jespaInit = new HashMap<String, String>();
jespaInit.put("properties.path", "src/test/resources/jespa_ntlm.prp");
ServletContainer servlet = new ServletContainer(
new PortfolioApplication());
return ServletDeploymentContext.forServlet(servlet)
.initParam("javax.ws.rs.Application", "com._3esi.portfolio.PortfolioApplication")
.initParam(ServerProperties.PROVIDER_PACKAGES, this.getClass().getPackage().getName())
//.addFilter(HttpSecurityFilter.class, "HttpSecurityFilter", jespaInit)
.addFilter(MyHttpSecurityFilter.class, "MyHttpSecurityFilter")
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment