随笔分类 - springMVC
摘要:如题: service1: dao1.save(obj); //失败,应该给spring捕获,但没有,程序继续执行下去了。 redisService.fun1(); //被执行 service2: dao1.update(obj); //失败,错误给spring捕获,抛出异常,程序终止。 redis
阅读全文
摘要:HandlerInterceptoer拦截的是请求地址,所以针对请求地址做一些验证、预处理等操作比较合适。
阅读全文
摘要:待定
阅读全文
摘要:一. log4j.properties 1. log4j.properties放在spring工程的src/main/rescours目录下无法读取。 测试后发现需要把log4j.properties文件放在src/main/webapp/WEB-INF目录下, 2. web.xml配置 <cont
阅读全文
摘要:getContextPath:/test //上下文,类似工程名 getServletPath:/test.jsp getRequestURI:/test/test.jsp getRequestURL:http://localhost:8080/test/test.jsp
阅读全文
摘要:jsp页面导入css、js提示上述问题。 Spring对静态资源的请求做专门处理 <!-- 对静态资源的请求 --><mvc:resources location="/js/" mapping="/js/**"/>
阅读全文
摘要:<context:component-scan> Web.xml中 <servlet> <servlet-name>springMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</s
阅读全文