任务
①异步任务
→@EnableAsync,@Async
②定时任务
→@EnableScheduling,@Scheduled
③邮件任务
→starter-mail
→username,password,host(smtp.qq.com),ssl.enable=true(开启安全连接);要开通邮箱的POp3、IMAP等服务,密码可以使用授权码
→注入JavaMailSenderImpl使用
→SimplsMailMessage简单消息,MimeMessage复杂消息
安全
①spring Security认证,授权
②使用:
→starter-security
→编写配置类,@EnableWebSecurity注解
→定制请求授权规则:configure(HttpSecurity)
→定制认证规则:configure(AuthenticationManagerBuilder)
③开启记住我,默认14天
④oAuth2,shiro