@Override public void onStartup(Set<Class<?>> c, ServletContext ctx) throws ServletException { verifyServletVersion(); }
@Override public void onStartup(ServletContext servletContext) throws ServletException { // Verify servlet version also for SpringBoot. ServletVerifier.verifyServletVersion(); ApplicationRouteRegistry registry = ApplicationRouteRegistry .getInstance(servletContext); // If the registry is already initialized then RouteRegistryInitializer // has done its job already, skip the custom routes search if (registry.getRegisteredRoutes().isEmpty()) { /* * Don't rely on RouteRegistry.isInitialized() negative return value * here because it's not known whether RouteRegistryInitializer has * been executed already or not (the order is undefined). Postpone * this to the end of context initialization cycle. At this point * RouteRegistry is either initialized or it's not initialized * because an RouteRegistryInitializer has not been executed (end * never will). */ servletContext.addListener(new RouteServletContextListener()); } servletContext.addListener(new ErrorParameterServletContextListener()); servletContext .addListener(new AnnotationValidatorServletContextListener()); }
@Override public void onStartup(ServletContext servletContext) throws ServletException { // Verify servlet version also for SpringBoot. ServletVerifier.verifyServletVersion(); RouteRegistry registry = RouteRegistry.getInstance(servletContext); // If the registry is already initialized then RouteRegistryInitializer // has done its job already, skip the custom routes search if (!registry.navigationTargetsInitialized()) { /* * Don't rely on RouteRegistry.isInitialized() negative return value * here because it's not known whether RouteRegistryInitializer has * been executed already or not (the order is undefined). Postpone * this to the end of context initialization cycle. At this point * RouteRegistry is either initialized or it's not initialized * because an RouteRegistryInitializer has not been executed (end * never will). */ servletContext.addListener(new RouteServletContextListener()); } if (!registry.errorNavigationTargetsInitialized()) { // Same thing: don't rely on hasNavigationTargets() negative return // value servletContext .addListener(new ErrorParameterServletContextListener()); } servletContext .addListener(new AnnotationValidatorServletContextListener()); }