enhance constructor, so an existing InterceptorService could be passed in (#1749)

This commit is contained in:
gematik FuE 2020-05-01 13:36:45 +02:00 committed by GitHub
parent a786756169
commit 9ace4889bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -149,8 +149,12 @@ public class RestfulServer extends HttpServlet implements IRestfulServer<Servlet
* Constructor
*/
public RestfulServer(FhirContext theCtx) {
this(theCtx, new InterceptorService());
}
public RestfulServer(FhirContext theCtx, IInterceptorService theInterceptorService) {
myFhirContext = theCtx;
setInterceptorService(new InterceptorService());
setInterceptorService(theInterceptorService);
}
private void addContentLocationHeaders(RequestDetails theRequest, HttpServletResponse servletResponse, MethodOutcome response, String resourceName) {