![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
I wish I could do it
这个作者很懒,什么都没留下…
展开
-
WEB-INF下jsp页面如何访问
请求转发在服务器端内部实现,因此使用请求转发的方式可以访问WEB-INF目录下受保护的资源1.处理器方法返回 ModelAndView 时需在 setViewName()指定的视图前添加 “forward:”,因为使用了 “forward:”,此时的视图不再与视图解析器一同工作,这样可以在配置了解析器时指定不同位置的视图。 视图页面必须写出相对于项目根的路径。如:modelAndView.setViewName("forward:/WEB-INF/jsp/success.jsp");2.处理器原创 2021-02-09 20:37:00 · 1072 阅读 · 0 评论 -
springmvc接收日期字段处理方式
springmvc接收日期字段处理方式1.使用InitBinder初始化绑定(有效范围 当前controller) /** * 日期属性编辑器 */ @InitBinder public void initBinder(WebDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat.setLenient(false);原创 2021-02-05 21:36:40 · 238 阅读 · 0 评论 -
Shiro
1.shiro环境搭建创建一个普通 SpringBoot 的 Web 工程 01-Shiro 添加依赖包<dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-spring</artifactId><version>1.3.2</version></dependency>2.配置shiro2.1创建配置类//标记当前类原创 2021-01-30 21:40:55 · 69 阅读 · 0 评论 -
java中用I/O流实现文件上传
依赖添加需要添加以下两个依赖<dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.1</version></dependency> <dependency> <groupId>commons-i原创 2021-02-04 13:18:35 · 420 阅读 · 0 评论