mirror of
https://github.com/ityouknow/spring-boot-examples.git
synced 2026-05-19 19:46:59 +08:00
add
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
package com.neo;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class CommandLineRunnerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("The service to start.");
|
||||
SpringApplication.run(CommandLineRunnerApplication.class, args);
|
||||
System.out.println("The service has started.");
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.neo.runner;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Order(1)
|
||||
public class OrderRunner1 implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
System.out.println("The OrderRunner1 start to initialize ...");
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.neo.runner;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Order(2)
|
||||
public class OrderRunner2 implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
System.out.println("The OrderRunner2 start to initialize ...");
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.neo.runner;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class Runner implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
System.out.println("The Runner start to initialize ...");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user