创建一个组件类并继承CommandLineRunner接口,实现接口的run方法,
然后添加@Order注解指定启动顺序,用同样的方法创建第二个组件类
在启动配置中添加程序运行时参数
看到两个runner按照指定的启动顺序成功启动了,并输出了传入的参数
创建一个组件类并继承CommandLineRunner接口,实现接口的run方法,
然后添加@Order注解指定启动顺序,用同样的方法创建第二个组件类
在启动配置中添加程序运行时参数
看到两个runner按照指定的启动顺序成功启动了,并输出了传入的参数
SpringBoot使用iText操作PDF
在开发中可能会有这样的情景。需要在容器启动的时候执行一些内容。比如读取
...
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M