Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- svelte
- react
- Vue3
- loguru
- gradle
- EUREKA
- fastapi
- vitejs
- nodejs
- sveltekit
- 오라클
- npm
- Vue
- Logging
- style
- InteliJ
- JUnit
- Python
- NextJS
- springboot
- NextJS13
- Shell
- ubuntu
- Spring
- fetch
- Java
- vuex
- d3js
- post
- Test
Archives
- Today
- Total
양군의 행복한 이야기
Shutdown Hook 본문
ShutDown shutDown = new ShutDown(this);
Runtime.getRuntime().addShutdownHook(shutDown);
public class ShutDown extends Thread {
private ProcessSchedulerMain tcm = null;
public ShutDown(ProcessSchedulerMain _obj){
tcm = _obj;
}
public void run(){
ShutDownProcess();
}
private void ShutDownProcess(){
logger.info("Client Shutdown");
System.out.println("Shutdown OK?");
}
}
자바 프로세스가 종료시 구동된다.
kill 명령어나 이클립스에서 강제종료는 잡아 내지 못한다.