配置Servlet时可以设置的一些初始化参数,总结如下:
-
ContextAttribute: 在ServletContext的属性中,要用作WebApplicationContext的属性名称。
-
ContextClass: 创建WebApplicationContext的类型
-
ContextConfigLocation: SpringMVC配置文件的位置。
-
publishContext: 是否将webApplicationContext设置到ServletContext的属性。