摘要: https://www.processon.com/ 阅读全文
posted @ 2021-03-08 22:13 harrietszhang 阅读(42) 评论(0) 推荐(0) 编辑
摘要: spring定时任务 TaskScheduler 任务调度者 TaskExecutor 任务执行者 @EnableScheduling //开启定时功能的注解 @Scheduled //什么时候执行 Cron表达式 1、使用方式 开启定时功能注解,在启动类上 2、将类对象添加到Spring容器中后在 阅读全文
posted @ 2021-03-08 22:00 harrietszhang 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1、导入邮件发送Maven依赖 <!--邮件发送 MailProperties类中查看配置信息 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</art 阅读全文
posted @ 2021-03-08 21:24 harrietszhang 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 在Controller调用长时间的任务方法时使用异步任务,可以立即返回结果,提高用户体验,例如:邮件发送 1、在启动类上添加注解 @SpringBootApplication @EnableAsync//添加异步执行注解,后续只需要在方法上添加@Async注解即可异步执行任务 2、在需要异步执行的方 阅读全文
posted @ 2021-03-08 20:32 harrietszhang 阅读(380) 评论(0) 推荐(0) 编辑
摘要: ${AnsiColor.BRIGHT_BLACK}////////////////////////////////////////////////////////////////////// _ooOoo_ //// o8888888o //// 88" . "88 //// (| ^_^ |) / 阅读全文
posted @ 2021-03-08 16:36 harrietszhang 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1、导入Maven依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version> </dependency> 2、配置ap 阅读全文
posted @ 2021-03-08 15:19 harrietszhang 阅读(2389) 评论(0) 推荐(0) 编辑
摘要: 1、配置application.yml spring: datasource: type: com.alibaba.druid.pool.DruidDataSource # 数据源的其他配置 initialSize: 5 minIdle: 5 maxActive: 20 maxWait: 60000 阅读全文
posted @ 2021-03-08 11:53 harrietszhang 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1、添加Shiro的Maven依赖 <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>1.5.3</version> </dependency> 2、Shir 阅读全文
posted @ 2021-03-08 10:44 harrietszhang 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 1、创建拦截器类,实现 HandlerInterceptor接口 public class LoginInterceptor implements HandlerInterceptor { Logger logger = LoggerFactory.getLogger(LoginIntercepto 阅读全文
posted @ 2021-03-08 10:05 harrietszhang 阅读(66) 评论(0) 推荐(0) 编辑