基础
记录一些容易遗忘的基础知识
aqing617
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot 登陆后跳转到index页面
1. 如果不作任何配置,在static或templates文件夹中放入index.html,会自动跳转index.html 原因: (4条消息) Spring Boot 默认跳转到index.html的二种方式_NULL-优快云博客_springboot 默认index.html 2. 在controller中配置 @GetMapping("/") public String index(){ return "index"; } 应该使用@Controll.原创 2021-12-21 16:20:01 · 4080 阅读 · 0 评论 -
【基础】使用@Scheduled 执行定时任务
SpringBoot内置定时任务,只需注解@Scheduled就可以开启定时。 首先在入口程序xxxApplication 添加注解@EnableScheduling 开发时遇到的应用场景:已经发布的serviceJob,需要定时从slurm查询其运行状态(pending,running,canceled,failed等),更新到数据库中,代码如下,设定为每3秒更新一次 @Scheduled(cron = "*/3 * * * * *") public void updateJobStat.原创 2021-12-17 15:27:32 · 1413 阅读 · 0 评论
分享