스프링

The path to the Hosts file in Windows 7 is the same as usual:

%systemroot%\system32\drivers\etc\

 

ip 주소가 아닌 서버 이름으로 변경

C:\Windows\System32\drivers\etc

hosts


# linux name resolution is handled within DNS itself.

192.168.111.128 demo2

 

cyj@cjh-PC MINGW64 ~
$ ssh root@demo2
The authenticity of host 'demo2 (192.168.111.128)' can't be established.
ECDSA key fingerprint is SHA256:K0Ct6qIMzHI93vl0il4VwOHf+VLtILpDPA9RDriJ/YY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'demo2' (ECDSA) to the list of known hosts.
root@demo2's password:
Last login: Mon Jul 24 05:02:12 2017
[root@localhost ~]# ls

 

 

 

[root@localhost spring_boot_demo2]# ls -al
합계 28                                                                                                                           
drwxrwxrwx. 7 root   root    151  7월 20 03:36 .
drwx------. 5 centos centos  120  7월 20 03:17 ..
drwxrwxrwx. 8 root   root    163  7월 20 03:08 .git
-rwxrwxrwx. 1 root   root    249  7월 20 03:08 .gitignore
drwxrwxrwx. 3 root   root     21  7월 20 03:08 .mvn
-rwxrwxrwx. 1 root   root     19  7월 20 03:08 README.md
drwxrwxrwx. 3 root   root     22  7월 20 03:08 WebContent
-rwxrwxrwx. 1 root   root   6468  7월 20 03:08 mvnw
-rwxrwxrwx. 1 root   root   4994  7월 20 03:08 mvnw.cmd
-rwxrwxrwx. 1 root   root   2073  7월 20 03:08 pom.xml
drwxrwxrwx. 4 root   root     30  7월 20 03:08 src
drwxr-xr-x. 9 root   root    219  7월 20 03:36 target
[root@localhost spring_boot_demo2]#


 

현재 git clone

spring_boot  디렉토리로 git 복사

 

# git clone https://github.com/braverokmc79/spring_boot_demo2.git

 

# cd spring_boot_demo2

 

mvnw 권한 설정

 

chmod 777 mvnw

 

메이븐 업데이트  및 다운로드

#  ./mvnw clean package

 

target 디렉토리로 이동

 

서버 실행

[root@localhost target]# java -jar my-slipp-1.0.jar &

 

 

만약 현재 프로세스 가 실행중이라면 프로세스 죽이기

프로세스 죽이기

[root@localhost spring_boot_demo2]# kill -9 6305

 

[root@localhost spring_boot_demo2]# ps -ef | grep java
root      15062   5962  0 09:24 pts/0    00:00:00 grep --color=auto java

 

 

[root@localhost target]# ps -ef |grep java
root       4589   4139  1 05:31 pts/0    00:00:30 java -jar my-slipp-1.0.jar
root       5002   4139  5 05:45 pts/0    00:00:55 java -jar my-slipp-1.0.jar
root       5489   4139  0 06:03 pts/0    00:00:00 grep --color=auto java
[root@localhost target]# kill -9 4589
[root@localhost target]# kill -9 5002
[1]-  ì£½ì—ˆìŒ               java -jar my-slipp-1.0.jar 

 

 

그러나 mustach 에서 페이지 jar 배포시 mustach 가 인식을 못해서 다음과 같은 에러

 

 

그래서 # ./mvnw clean package 로 처리하는 것이 아니라 

 

 

다음과 같이 실행을 한다.

 

./mvnw spring-boot:run &

[root@localhost spring_boot_demo2]# ./mvnw spring-boot:run &

 

 

 

 

=====> 문제해결  jar 파일 배포가 아닌 war 파일로 배포

 

http://braverokmc.dothome.co.kr/m01/spring/view/858

 

 

 

 

 

 

 

about author

PHRASE

Level 60  머나먼나라

아무리 가까운 사람일지라도 어찌 나의 짐을 짊어지려 하겠는가. -코란

댓글 ( 5)

댓글 남기기

작성