研究springboot启动的整个流程。
SpringApplicationRunListener监听器,监听的就是SpringApplication对象的整个流程。
通过源码和图解对比,我们知道了其运行流程。 清楚知道4种监听器(ApplicationContextInitializer,SpringApplicationRunListener,CommandLineRunner,ApplicationRunner)的运行时机。
知道banner的源码,我们可以自己改动输出的banner。
通过配置banner,我们切换了banner的输出。
#指定图片banner(显示不好,智能打印黑白)
spring.banner.image.location=panda.png
#指定文本banner
spring.banner.location=mybanner.txt
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/171552.html原文链接:https://javaforall.cn