摘要:
什么是启动类加载器 就是SpringBoot启动后,要立马执行的程序,这时候就需要启动类加载器完整这个要求。 启动类加载器实践 1、创建第一个启动类加载器(方式1) 1)、创建启动类加载器,实现CommandLineRunner接口 @Component public class FirstComm 阅读全文
posted @ 2020-02-27 12:26 work hard work smart 阅读(3509) 评论(0) 推荐(1)
|
|||
|
摘要:
什么是启动类加载器 就是SpringBoot启动后,要立马执行的程序,这时候就需要启动类加载器完整这个要求。 启动类加载器实践 1、创建第一个启动类加载器(方式1) 1)、创建启动类加载器,实现CommandLineRunner接口 @Component public class FirstComm 阅读全文
posted @ 2020-02-27 12:26 work hard work smart 阅读(3509) 评论(0) 推荐(1)
摘要:
Sping Boot计时器 用来统计任务的耗时 1、进入run方法,其中StopWatch就是计时器 2、计时器的使用 @RunWith(SpringRunner.class) @SpringBootTest public class StopWatchTest { @Test public voi 阅读全文
posted @ 2020-02-27 11:58 work hard work smart 阅读(2358) 评论(0) 推荐(0) |
|||