随笔分类 -  springmvc

摘要:1、导入依赖;(jackson是因为在配置文件中添加了配置;) <!--文件上传--> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1. 阅读全文
posted @ 2021-04-16 14:39 卡卡罗特琪琪 阅读(76) 评论(0) 推荐(0)
摘要:重定向我们一般都是通过用这种方式;redirect必须是方法映射路径,jsp无效 return "redirect:/user/goLogin"; 重定向带参数的话,有两种写法; 第一种: attr.addAttribute("test1", "51gjie中");//跳转地址带上test1参数 获 阅读全文
posted @ 2021-04-15 16:45 卡卡罗特琪琪 阅读(473) 评论(0) 推荐(0)
摘要:自定义拦截器类实现org.springframework.web.servlet.HandlerInterceptor 在applicationContext.xml添加拦截器配置 <!--拦截器配置--> <mvc:interceptors> <mvc:interceptor> <!--包含这个请 阅读全文
posted @ 2021-04-15 09:43 卡卡罗特琪琪 阅读(191) 评论(0) 推荐(0)
摘要:普通版 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst 阅读全文
posted @ 2021-04-12 14:41 卡卡罗特琪琪 阅读(97) 评论(0) 推荐(0)