@Test public void testApiServletRegistration() { WebApplicationContext context = mock(WebApplicationContext.class); MultipartProperties properties = mock(MultipartProperties.class); ServletRegistrationBean bean = registration.apiServletRegistration(context, properties); assertNotNull(bean); assertEquals(API_SERVLET_NAME, bean.getServletName()); }
@Bean public ServletRegistrationBean apiServletRegistration(WebApplicationContext context, MultipartProperties multipartProperties) { DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(context); ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(dispatcherServlet, baseUrlMapping()); servletRegistrationBean.setName(API_SERVLET_NAME); servletRegistrationBean.setLoadOnStartup(API_LOAD_ON_STARTUP); servletRegistrationBean.setMultipartConfig(multipartProperties.createMultipartConfig()); return servletRegistrationBean; }
WebResourcesRegistration { @Bean public ServletRegistrationBean apiServletRegistration(WebApplicationContext context, MultipartProperties multipartProperties) { DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(context); ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(dispatcherServlet, baseUrlMapping()); servletRegistrationBean.setName(API_SERVLET_NAME); servletRegistrationBean.setLoadOnStartup(API_LOAD_ON_STARTUP); servletRegistrationBean.setMultipartConfig(multipartProperties.createMultipartConfig()); return servletRegistrationBean; } }
WebResourcesRegistration { @Bean public ServletRegistrationBean apiServletRegistration(WebApplicationContext context, MultipartProperties multipartProperties) { DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(context); ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(dispatcherServlet, baseUrlMapping()); servletRegistrationBean.setName(API_SERVLET_NAME); servletRegistrationBean.setLoadOnStartup(API_LOAD_ON_STARTUP); servletRegistrationBean.setMultipartConfig(multipartProperties.createMultipartConfig()); return servletRegistrationBean; }  }
WebResourcesRegistration { @Bean public ServletRegistrationBean apiServletRegistration(WebApplicationContext context, MultipartProperties multipartProperties) { DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(context); ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(dispatcherServlet, baseUrlMapping()); servletRegistrationBean.setName(API_SERVLET_NAME); servletRegistrationBean.setLoadOnStartup(API_LOAD_ON_STARTUP); servletRegistrationBean.setMultipartConfig(multipartProperties.createMultipartConfig()); return servletRegistrationBean; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer(); }
WebResourcesRegistration { @Bean public ServletRegistrationBean apiServletRegistration(WebApplicationContext context, MultipartProperties multipartProperties) { DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(context); ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(dispatcherServlet, baseUrlMapping()); servletRegistrationBean.setName(API_SERVLET_NAME); servletRegistrationBean.setLoadOnStartup(API_LOAD_ON_STARTUP); servletRegistrationBean.setMultipartConfig(multipartProperties.createMultipartConfig()); return servletRegistrationBean; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer();  }