Spring tomcat 실행시 서비스 자동 실행 방법

북마크 추가


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class CommandLineStartupRunner implements CommandLineRunner {

@Autowired
private FooService fooService;

@Override
public void run(String... args) throws Exception {
//todo
}
}
관리자
2020-02-06 17:06
SHARE
keyboard_arrow_left
keyboard_arrow_up