1
1
package com .linkedin .gms ;
2
2
3
+ import static com .linkedin .metadata .boot .OnBootApplicationListener .SCHEMA_REGISTRY_SERVLET_NAME ;
4
+
3
5
import com .datahub .auth .authentication .filter .AuthenticationFilter ;
4
6
import com .datahub .gms .servlet .Config ;
5
7
import com .datahub .gms .servlet .ConfigSearchExport ;
@@ -35,6 +37,7 @@ public void onStartup(ServletContext container) {
35
37
"contextInitializerClasses" , "com.linkedin.gms.SpringApplicationInitializer" );
36
38
37
39
// Auth filter
40
+ List <String > servletNames = new ArrayList <>();
38
41
39
42
// Independent dispatcher
40
43
schemaRegistryServlet (container );
@@ -43,8 +46,6 @@ public void onStartup(ServletContext container) {
43
46
healthCheckServlet (container );
44
47
configServlet (container );
45
48
46
- List <String > servletNames = new ArrayList <>();
47
-
48
49
// Restli non-Dispatcher
49
50
servletNames .add (restliServlet (rootContext , container ));
50
51
@@ -69,11 +70,12 @@ public void onStartup(ServletContext container) {
69
70
*/
70
71
private void schemaRegistryServlet (ServletContext container ) {
71
72
AnnotationConfigWebApplicationContext webContext = new AnnotationConfigWebApplicationContext ();
73
+ webContext .setId (SCHEMA_REGISTRY_SERVLET_NAME );
72
74
webContext .register (SchemaRegistryServletConfig .class );
73
75
74
76
DispatcherServlet dispatcherServlet = new DispatcherServlet (webContext );
75
77
ServletRegistration .Dynamic registration =
76
- container .addServlet ("dispatcher-schema-registry" , dispatcherServlet );
78
+ container .addServlet (SCHEMA_REGISTRY_SERVLET_NAME , dispatcherServlet );
77
79
registration .addMapping ("/schema-registry/*" );
78
80
registration .setLoadOnStartup (1 );
79
81
registration .setAsyncSupported (true );
0 commit comments