![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
文章平均质量分 52
不得不学习的小Y
这个作者很懒,什么都没留下…
展开
-
windows按键变成快捷键如何解决
Windows键盘错乱原创 2023-06-12 08:57:17 · 334 阅读 · 0 评论 -
ececl表格常用
excel常见实用原创 2022-11-12 14:45:38 · 182 阅读 · 0 评论 -
数据库日期正常显示前端相互转换
显示到前端:加标签<%@ taglib uri=“http://java.sun.com/jsp/jstl/fmt” prefix=“fmt”%><%–引入日期转化–%>填入数据<fmt:formatDate value="${patient.registerTime}" pattern=“yyyy-MM-dd HH:mm:ss” />保存到数据库在pojo类中日期属性 +@DateTimeFormat(pattern = "yyyy-MM-dd HH:原创 2021-09-07 10:23:54 · 203 阅读 · 0 评论 -
原生组件注入servlet filter context
方法一:1 要在类上加@WebServlet(urlPatterns = “/my”)//效果直接响应,没有Spring拦截2 要配合扫描包使用在含有main的类中Boot05AdminApplication加上@ServletComponentScan(“com.ysj.admin”)//指定原生的servlet在哪里3 使用Filter以及监听器Listener都要配合@ServletComponentScan(“com.ysj.admin”)使用@WebFilter(urlPatterns原创 2021-09-03 23:00:38 · 75 阅读 · 0 评论 -
boot-拦截器
描述场景:实现登录之前的非法访问,以及对静态资源的放行!/** * @author ysj * @createTime 2021/9/3 2:04 下午 * @description 1 登录检查 要拦截那些请求 把这些配置放在容器中 * 2 配置拦截器 并对其进行拦截与放行 */@Slf4jpublic class LoginInterceptor implements HandlerInterceptor { @Override public原创 2021-09-03 17:44:26 · 145 阅读 · 0 评论 -
SpringMVC拦截器
过滤器servlet规范中的一部分,任何java web工程都可以使用在url-pattern中配置了/*之后,可以对所有要访问的资源进行拦截拦截器拦截器是SpringMVC框架自己的,只有使用了SpringMVC框架的工程才能使用拦截器只会拦截访问的控制器方法, 如果访问的是jsp/html/css/image/js是不会进行拦截的自定义拦截器那如何实现拦截器呢?想要自定义拦截器,必须实现 HandlerInterceptor 接口。1、新建一个Moudule , springmvc-07-In原创 2021-08-27 10:47:57 · 61 阅读 · 0 评论 -
SpringMVC文件上传下载
首先要在配置文件中配置 <!--文件上传配置--> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <!-- 请求的编码格式,必须和jSP的pageEncoding属性一致,以便正确读取表单的内容,默认为ISO-8859-1 --> <property na原创 2021-08-27 10:28:41 · 70 阅读 · 0 评论 -
错误总结!
1.查询时的模糊查询like concat("%", ,"%")2.页面跳转比如form表单中的 查找的是controller中的路径3.超链接 携带参数 是 两种方法hello?id=$(book.bookId)hello/${book.bookId} 在跳转方法中要 /{bookId}. 参数中要@PathVariable...原创 2021-08-26 22:26:38 · 62 阅读 · 0 评论 -
SpringMVC基础运行篇
基础配置在web中配置DispatchServlet:这是SpringMVC的核心:请求分发器,前端控制器 <!--配置DispatchServlet:这是SpringMVC的核心:请求分发器,前端控制器--> <!--所有的请求都经过这个servlet--> <servlet> <servlet-name>springmvc</servlet-name> <servlet-cla原创 2021-08-25 12:17:39 · 86 阅读 · 0 评论 -
Spring-Mybatis 练习
1.pojo中的User类package com.ysj.pojo;import lombok.AllArgsConstructor;import lombok.Data;import lombok.NoArgsConstructor;@Data@NoArgsConstructor@AllArgsConstructorpublic class User { private int id; private String name; private String pa原创 2021-08-23 22:45:14 · 142 阅读 · 0 评论 -
date的转化
字符串转化为Date(SQL)类型 String strTime = "1998-06-08"; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = null; try { date = simpleDateFormat.parse(strTime); } catch (ParseException e) { e.printSt原创 2021-08-23 17:05:46 · 51 阅读 · 0 评论 -
mybatis缓存
缓存1、什么是缓存 [ Cache ]?存在内存中的临时数据。将用户经常查询的数据放在缓存(内存)中,用户去查询数据就不用从磁盘上(关系型数据库数据文件)查询,从缓存中查询,从而提高查询效率,解决了高并发系统的性能问题。2、为什么使用缓存?减少和数据库的交互次数,减少系统开销,提高系统效率。3、什么样的数据能使用缓存?经常查询并且不经常改变的数据。Mybatis缓存MyBatis包含一个非常强大的查询缓存特性,它可以非常方便地定制和配置缓存。缓存可以极大的提升查询效原创 2021-08-23 10:42:19 · 51 阅读 · 0 评论 -
mybatis动态sql
动态的SQLif动态查询(可以实现多个条件查询)必须要有where 1=1 <select id="queryBlogIF" parameterType="map" resultType="blog"> select * from blog where 1=1 <if test="title!=null"> and title = #{title} </if> <if原创 2021-08-23 07:31:05 · 46 阅读 · 0 评论 -
mybatis学习01
1 创建一个初始模版(固定)//sqlSessionFactory--->sqlSessionpublic class MybatisUtils { private static SqlSessionFactory sqlSessionFactory; static { try { //获取Mybatis第一步:获取sqlSessionFactory对象 String resource = "org/mybatis/原创 2021-08-21 21:00:29 · 62 阅读 · 0 评论