
SpringBoot
小小花生酱
星光不问赶路人,时光不负有心人
展开
-
Springboot中的定时任务
1、在启动类上加入@EnableScheduling注解 @EnableScheduling @SpringBootApplication public class TaskApplication { public static void main(String[] args) { SpringApplication.run(TaskApplication.class, args); }...原创 2019-12-19 14:05:35 · 240 阅读 · 0 评论 -
SpringSecurity的使用
编写配置文件,继承WebSecurityConfigurerAdapter 接口,具体的使用参考 https://docs.spring.io/spring-security/site/docs/current/guides/html5/helloworld-boot.html 权限的授予与用户的认证规则 @EnableWebSecurity public class MySecurityConf...原创 2019-12-19 14:02:21 · 178 阅读 · 0 评论 -
Springboot的开发热部署
在开发中我们修改了一个java文件想看到效果又不得不重新启动应用,这到导致大量时间的花费,我们希望不重启应用的情况下,程序可以自动部署(热部署),这里推荐使用spring boot devtools。 spring-boot-devtools 是一个为开发者服务的一个模块,其中最重要的功能就是自动应用代码更改到最新的App上面去。原理是在发现代码有更改之后,重新启动应用,但是比速度比手动停止后再启...原创 2019-12-19 14:01:47 · 168 阅读 · 0 评论