이 값을 1로 설정하는 이유를 알고 싶습니다. API를 읽었을 때 의미합니다.이 동적 ServletRegistration이 나타내는 Servlet에서 loadOnStartup 우선 순위를 설정합니다. 왜 1입니까?Spring MVC가 LoadOnStartup을 1로 설정하는 이유는 무엇입니까?
public void onStartup(ServletContext servletContext)
throws ServletException {
// TODO Auto-generated method stub
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
ctx.register(WebAppConfig.class);
servletContext.addListener(new ContextLoaderListener(ctx));
ctx.setServletContext(servletContext);
Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(ctx));
servlet.addMapping("/");
servlet.setLoadOnStartup(1);
}