采用注解配置SpringMVC,有SpringSecurity,Dao,Controller,Servlet等的样例,部分代码: publicvoidonStartup(ServletContextservletContext)throwsServletException{ //日志文件配置 servletContext.setInitParameter("log4jConfigLocation","classpath:log4j.xml"); servletContext.setInitParameter("log4jExposeW