23.8 Using the ApplicationRunner or CommandLineRunner 实现ApplicationRunner 和CommandLineRunner

若是您须要在SpringApplication启动以后运行一些特定的代码,那么您能够实现ApplicationRunner或commandlinrun 接口。这两个接口都以相同的方式工做,并提供一个单独的运行方法,在springapplication.run(.)完成以前,它将被调用。spring CommandLineRunner接口提供对应用程序参数的访问,做为一个简单的字符串数组,Appli
相关文章
相关标签/搜索