스프링부트 메인 만들기(SpringBoot main)
1-4. Writing the code(Spring Boot main)
n 아래와 같이 main 함수를 만들면 된다.
[실행 방법]
1-5. Writing the code(CommandLineRunner)
n 스프링 부트를 시작할 때 Command Line arguments를 주거나, 어떤 코드를 실행하려면 CommandLineRunner 인터페이스의 run(String…args)를 구현하면 된다. 만약 CommandLineRunner 인터페이스 구현이 여러 개 있는 경우 순서를 부여하기 위해서는 @Order 어노테이션을 사용하면 된다.
댓글 없음:
댓글 쓰기