반응형 ThreadPool1 [Java] ThreadPool 을 이용한 Method 실행하기 배치 스케줄 코드를 구현하다가 사용한 코드를 정리하려고 한다DB 또는 정의되어 있는 메서드 명을 가져와서동적으로 메서드를 실행시키는 코드로 ThreadPool 을 이용하여 병렬처리가 가능하고Method Class 를 이용하여 메서드를 실행시킨다 메서드를 호출하기 위한 테스트 main Classpublic class TestController { public static void main(String[] args) throws Exception { // method 실행 시킬 class TestExecutor testExecutor = new TestExecutor(); testExecutor.TestMethod(); }} ThreadPool 을 생.. 2025. 4. 25. 이전 1 다음 반응형