- 博客(3)
- 收藏
- 关注
原创 springBoot定时任务
springBoot定时任务 1.定义组件 @Controller public class SchedulerTask { @Scheduled(fixedDelay = 5000) public void fixedDelayjob(){ System.out.println("fixedDelay 每隔5秒" +new Date()); } @Scheduled(fixedRate = 3000) public void fixedRat
2020-08-23 19:28:59
204
原创 springboot整合swagger
springboot整合swagger 前后端分离后,维护接口文档基本上是必不可少的工作。一个理想的状态是设计好后,接口文档发给前端和后端,大伙按照既定的规则各自开发,开发好了对接上了就可以上线了。当然这是一种非常理想的状态,实际开发中却很少遇到这样的情况,接口总是在不断的变化之中,有变化就要去维护,做过的小伙伴都知道这件事有多么头大!还好,有一些工具可以减轻我们的工作量,Swagger2就是其中之一 1.第一步在springboot项目中导入依赖 <!--swagger文档功能--> <
2020-08-23 19:01:29
178
原创 springBoot整合mybatis入门测试
springboot 整合mybatis入门 一.新建springboot项目 二.第二步,以下是我已经填好的 三.选中以下两个,然后直接下一步,然后直接finish 四.打开pom文件,导入以下两个依赖 五.新建以下文件, spring: profiles: active: dev datasource: url: jdbc:mysql://localhost:3306/maven driver-class-name: com.mysql.jdbc.Driver
2020-08-19 21:46:20
154
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人