2016-08-13 2 views

답변

0

명령 줄 러너 인터페이스에서 스크립트를 실행할 수 있습니다.

public class Application implements CommandLineRunner{ 

     public static void main(String[] args) throws Exception { 
     SpringApplication.run(Application.class, args); 
     } 

     @Override 
     public void run(String... strings) throws Exception { 
      // Call the batch script here 
     } 
    } 
+0

이 올바른 해답처럼 보이지만 내가 특별히 당신이 시작하기 전에 실행하는 스크립트가 필요하다고 언급 한 질문으로 잘 못 톰캣가 시작되기 전에 CommandLineRunner가 호출되어 있는지 확인 할 것입니다. –

관련 문제