Use ResponseHighlighterInterceptor in the JPA example project

This commit is contained in:
James Agnew 2015-12-16 12:03:58 -05:00
parent 96c0267fe1
commit 9c37c3b2a0
2 changed files with 15 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import ca.uhn.fhir.jpa.dao.DaoConfig;
import ca.uhn.fhir.jpa.util.SubscriptionsRequireManualActivationInterceptorDstu2;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor;
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor;
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
@Configuration
@EnableTransactionManagement()
@ -96,6 +97,15 @@ public class FhirServerConfig extends BaseJavaConfigDstu2 {
return retVal;
}
/**
* This interceptor adds some pretty syntax highlighting in responses when a browser is detected
*/
@Bean(autowire = Autowire.BY_TYPE)
public IServerInterceptor responseHighlighterInterceptor() {
ResponseHighlighterInterceptor retVal = new ResponseHighlighterInterceptor();
return retVal;
}
@Bean(autowire = Autowire.BY_TYPE)
public IServerInterceptor subscriptionSecurityInterceptor() {
SubscriptionsRequireManualActivationInterceptorDstu2 retVal = new SubscriptionsRequireManualActivationInterceptorDstu2();

View File

@ -65,6 +65,11 @@
remains committed to supporting JDK 6+ in the compiled library, but these
days it can only be built using JDK 8. Thanks to joelsch for the PR!
</action>
<action type="add">
Use ResponseHighlighterInterceptor in the hapi-fhir-jpaserver-example
project to provide nice syntax highlighting. Thanks to Rob Hausam for
noting that this wasn't there.
</action>
</release>
<release version="1.3" date="2015-11-14">
<action type="add">