CommandLineRunner Interface

First, start by creating a class that implements CommandLineRunner MyCommandLineRunner Interface

   

@Commponent the pojo registered to the spring container

@Order (2) The smaller this number before the priority

   

Second, the override run () function

   

args is when the system starts the argument passed

   

   

   

   

Third, the incoming parameters

1, IDEA arguments passed in

   

   

2, passing parameters when packaging operation

   

   

Third, renderings

   

   

   

Guess you like

Origin www.cnblogs.com/fernfei/p/12090763.html