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


(5.0)

북마크 추가


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
}
}
AD
통관알리미
2020-02-06 17:06
SHARE
댓글