package org.sang.config; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.DispatcherServlet; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRegistration; public class WebInitializer implements WebApplicationInitializer { public void onStartup(ServletContext servletContext) throws ServletException { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.register(MyMVCConfig.class); servletContext.addFilter("encodingFilter", new CharacterEncodingFilter("UTF-8",true)); ctx.setServletContext(servletContext); ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(ctx)); servlet.addMapping("/"); servlet.setLoadOnStartup(1); } }

abcdmly12 LV1
2024年1月12日
monolog LV4
2023年6月18日
微信网友_6260196253601792 LV7
2023年6月9日
6389181 LV7
2023年6月1日
刘海柱 LV1
2022年6月12日
wubinbin LV11
2021年12月10日
lsc860911 LV11
2021年11月24日
xbjzc123 LV5
2021年11月23日
eclipse_javen LV6
2021年8月21日
秦sir3067683450 LV10
2021年7月29日

ma406805131 LV19
2024年12月18日
dengge123 LV14
2024年12月13日
lilitu LV6
2024年5月29日
goccgoccgocc LV4
2024年5月23日
2131234536546 LV7
2024年3月31日
abcdmly12 LV1
2024年1月12日
XiaoSong888 LV3
2024年1月10日
fff2003 LV9
2023年12月23日
SQ2930501923 LV14
2023年11月14日
abandan LV4
2023年11月6日