-
Notifications
You must be signed in to change notification settings - Fork 44
Creating and Configuring Interceptor
jyotsna-tarento edited this page Jul 25, 2018
·
3 revisions
-
Clone the git repository for open-saber
-
Create a new interceptor class in registry-interceptor package
-
This class should implement Spring framework's HandlerInterceptor interface and override the preHandle, postHandle and afterCompletion on need basis
-
This class can also extend the BaseRequestHandler or BaseResponseHandler to manage requests and response
-
In order to use the middleware within this interceptor, we can modify the pom.xml in this package to include the dependency
-
Configuration for the interceptor can be added in GenericConfiguration class
-
While adding this configuration, the route needs to be specified, if not, it would apply to all routes