
2.4-java-框架-springBoot
纷纷四季
不觉雨纷纷,转眼四季过...
展开
-
SpringBoot学习要点记录----整合Servlet、Filter、Listener
代码:https://gitee.com/laputa219/springboot_demo/tree/master/boot_servlet 一、使用步骤 1.1 引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> 注:.原创 2020-09-03 17:29:28 · 218 阅读 · 0 评论 -
SpringBoot学习要点记录(八)----集成 Spring Security+SpringDataJpa
一、环境介绍 本篇采用SpringBoot 2.2.5 + Spring Security 5.2.2+springDatajpa 参考博客(感谢博主精彩总结):SpringBoot集成Spring Security(1) 他采用的是Mybatis,如果采用Mybaits可以看他的博客 我的项目地址:https://gitee.com/laputa219/springboot_demo/tree...原创 2020-03-26 14:04:20 · 427 阅读 · 0 评论 -
SpringBoot学习要点记录(七)----ehcache学习
本文为学习记录,如有不对,还望不吝赐教。 参考 【1】https://blog.youkuaiyun.com/yeiweilan/article/details/95636556 【2】https://www.cnblogs.com/kingsonfu/p/10412295.html 一、介绍 一个Java缓存框架,从hibernate发展而来,快速简单,具有多种缓存策略。 二、使用 2.1.1 环境搭建...原创 2020-03-23 16:00:37 · 223 阅读 · 0 评论 -
SpringBoot学习要点记录(六)----拦截器
一、使用步骤 1.定义拦截器实现 Handlerlnterceptor接口;重写3个具体的拦截器方法。 public class MyInterceptor1 implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse res...原创 2020-01-03 17:51:58 · 272 阅读 · 0 评论 -
SpringBoot学习要点记录(五)----整合swagger,swagger2注解
一、介绍 swagger是一款API 开发工具,可以根据resutful风格生成接口开发文档,并且支持做测试。 二、使用步骤 1.pom文件 <!--引入swagger--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger...原创 2020-01-03 14:50:47 · 297 阅读 · 0 评论 -
SpringBoot学习要点记录(四)----定时任务,异步定时任务
1.使用步骤 在启动类上加上@EnableScheduling注解,表示开启定时任务 在任务类上加上@Scheduled()注解,并设置参数 配置项 类型 详细描述 cron String 使用表达式的方式定义任务执行时间 zone String 设定区域时间 fixedDelay long 从上一个任务完成开始到下一个任务开始的间隔,单位为毫秒 fixedDela...原创 2019-12-24 15:57:19 · 352 阅读 · 0 评论 -
SpringBoot学习要点记录(二)----读取配置文件@Value @ConfigurationProperties @PropertySource注解使用
一、使用属性文件 在Spring Boot中使用属性文件,默认读取application.properties,读取方法有很多,这里只介绍最常用的方法。先添加Maven依赖,添加后Spring Boot将创建读取属性文件的上下文。 <dependency> <groupId>org.springframework.boot</groupId> <art...原创 2019-12-11 09:45:41 · 258 阅读 · 0 评论 -
SpringBoot学习要点记录(一)----注解、配置文件、日志
一、原理要点 1.1 starters的原理 starters是依赖关系的整理和封装。是一套依赖坐标的整合,可以让导入应用开发的依赖坐标更方便。 starter的命名规范: 官方的starter写法 spring-boot-starter-* 非官方的starter写法thirdpartyproject-spring-boot-starter starter为什么不需要写版本? 因为添加“p...原创 2019-12-10 15:00:43 · 179 阅读 · 0 评论 -
SpringBoot学习要点记录 ----小问题总结
1.访问不到jsp页面 1.配置 spring: mvc: view: prefix: /WEB-INF/page/ suffix: .jsp 2.需要引入jsp支持依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifa...原创 2019-12-16 11:39:32 · 158 阅读 · 0 评论