spring project war 배포시 윈도우 서버 서비스 등록하는 방법
1. winsw download
http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/
Index of releases/com/sun/winsw/winsw
repo.jenkins-ci.org
2. winsw.exe파일을 프로젝트 빌드된 위치로 이동
3. 프로젝트이름을 "oooService.war" 로 변경
4. winsw.exe 파일이름을 "oooService.exe"로 변경
5. xml 파일 생성 "oooService.xml"
<?xml version="1.0" encoding="UTF-8"?>
<service>
<id>oooService</id>
<name>oooService</name>
<description>oooService Windows Service</description>
<executable>java</executable>
<arguments>-jar "oooService.war"</arguments>
<logmode>rotate</logmode>
</service>
6. cmd 창으로 이동 후 명령어 입력 후 완료
oooService.exe install
-> 서비스 등록
oooService.exe uninstall
-> 서비스 삭제
'BackEND > Java' 카테고리의 다른 글
spring boot mail 발송 (0) | 2021.01.20 |
---|---|
git ignore 적용하는 방법 (0) | 2021.01.20 |
md5, sha256 암호화 방법과 로그인 프로세스 (0) | 2020.12.11 |
spring boot controller request multiple (0) | 2020.12.10 |
spring boot gradle mybatis 연동 (0) | 2020.12.09 |