
SpringBoot技术点
Springboot相关技术点整合
蜜獾互联网
聚焦国内外前沿技术文献、行业典型应用案例、互联网安全管理。
开源项目:https://gitee.com/ratel-admin
展开
-
springboot schedule corn 定时任务详解
Cron 表达式是一种用于指定定时任务执行时间的字符串表达式。它由 6 个字段组成,分别表示秒、分钟、小时、天数、月份和星期几。逗号(,):用于分隔多个值。例如,1,3,5 在小时字段中表示 1 点、3 点和 5 点执行。连字符(-):用于指定范围。例如,10-20 在日期字段中表示从 10 号到 20 号。斜线(/):用于指定间隔值。例如,*/5 在分钟字段中表示每 5 分钟执行一次。):仅用于日期和星期几字段,表示不指定具体值。星号(*):表示匹配任意值。例如,* 在分钟字段中表示每分钟都执行。原创 2024-11-29 11:46:00 · 442 阅读 · 0 评论 -
Springboot Scheduled fixedRate corn 定时任务
【代码】Springboot Scheduled fixedRate corn 定时任务。原创 2024-11-29 11:19:45 · 386 阅读 · 0 评论 -
Springboot @ConfigurationProperties对象 静态方法调用无效
一.问题1.springboot 使用@ConfigurationProperties注入对象 普通方法调用可以 在静态方法中调用的时候读取不到参数二.文件package com.lpinfo.framework.config;@Data@Component@PropertySource("classpath:/oss.properties")@ConfigurationProperties(prefix = "oss")public class OssPayProperti..原创 2020-05-23 10:34:03 · 3444 阅读 · 1 评论 -
Springboot/Java读取文件
====工程结构图///////////////////////java属性和加载器////////////// /** * 当测试类在 com.spt.example 下 * getResourceAsStream("test.txt") 会从com.spt.example包下开始找test.txt * getResourceAsStream("/test.txt") 会从classpath根下开始找test.txt原创 2020-05-23 00:12:55 · 863 阅读 · 0 评论