Server๐Ÿงค/IntelliJ

[Server/Spring] intelliJ์™€ ์‹ค์ œ ์„œ๋ฒ„ ์—ฐ๊ฒฐ

yujindonut 2022. 5. 26. 02:22
728x90

์šฐ์„  intellJ์™€ SSH๋ฅผ ์—ฐ๊ฒฐํ•ด์ฃผ์–ด์•ผํ•ฉ๋‹ˆ๋‹ค

https://vanillacreamdonut.tistory.com/255

 

[Server] IntelliJ์—์„œ SSH์—ฐ๊ฒฐํ•˜๊ธฐ / intelliJ ์šฐ๋ถ„ํˆฌ ์—ฐ๊ฒฐ

์ธํ…”๋ฆฌ์ œ์ด์—์„œ ์›น ์„œ๋ฒ„ ํ„ฐ๋ฏธ๋„์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํŽธ๋ฆฌํ•œ ๊ธฐ๋Šฅ์ด ์žˆ์Šต๋‹ˆ๋‹ค! ์œ ๋ฃŒ๋ฒ„์ „์„ ๋‹ค์šด๋ฐ›์œผ์…”์•ผํ•ฉ๋‹ˆ๋‹ค. ์ธํ…”๋ฆฌ์ œ์ด ์œ ๋กœ๋ฒ„์ „์€ ํ•™์ƒ๊ณ„์ •์œผ๋กœ ๋‹ค์šด๋ฐ›์œผ์‹ค ์ˆ˜ ์žˆ์–ด์š”! tools-> deployment -> remote

vanillacreamdonut.tistory.com

 

์ด๋ ‡๊ฒŒ ์—ฐ๊ฒฐ์„ ํ•ด์ฃผ์—ˆ๋‹ค๋ฉด, ์ €ํฌ๊ฐ€ ํ‰์†Œ์— nginx๋กœ ์—ฐ๊ฒฐ์„ ํ•ด์ฃผ์—ˆ๋˜ ๊ฒƒ์„ intelliJ๋กœ ๋˜‘๊ฐ™์ด ํ•ด๋ณด๋„๋ก ํ•ฉ์‹œ๋‹ค!

 

cd /var/www/udemy_server_practice_springboot/src/main/resources
vi application.yml

 

์—ฌ๊ธฐ์— ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋‚ด์šฉ์ด ์ž˜ ์ ํ˜€์žˆ๋Š”์ง€ ํ™•์ธ!

 

https://vanillacreamdonut.tistory.com/250?category=1266799 

 

[Spring] intelli J์™€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์—ฐ๊ฒฐํ•˜๊ธฐ

1. ์ธํ…”๋ฆฌ์ œ์ด์—์„œ git clone ์ง„ํ–‰ https://github.com/udemy-comgongbro/udemy_server_practice_springboot.git GitHub - udemy-comgongbro/udemy_server_practice_springboot Contribute to udemy-comgongbro/ud..

vanillacreamdonut.tistory.com

 

sudo ./gradlew clean build
sudo java -jar build/libs/demo-0.0.1-SNAPSHOT.jar

 

์ด๋ ‡๊ฒŒ ์„œ๋ฒ„ ์—ฐ๊ฒฐ์ด ์™„๋ฃŒ!


๋กœ์ปฌ์—์„œ rest API๋ฅผ ์ด์šฉํ•ด ํ•ด๋ดค๋˜ ์‹ค์Šต์„ ์‹ค์ œ ์ œ ๋„๋ฉ”์ธ์—์„œ ํ•ด๋ด…์‹œ๋‹ค!

 

์„œ๋ฒ„๊ฐ€ ์ผœ์ง„ ์ƒํƒœ์—์„œ ์˜ฌ๋ฆฌ๊ณ  ์‹ถ์€ ํŒŒ์ผ์„ ์„ ํƒํ•˜๊ณ  ๋„๊ตฌ -> ๋ฐฐํฌ-> ubuntu์— ์—…๋กœ๋“œ

๊ทธ๋ƒฅ ๋ฐ”๋กœ ์ €๋ ‡๊ฒŒ ํ•˜๋ฉด ์˜ค๋ฅ˜๊ฐ€ ๋‚ฉ๋‹ˆ๋‹ค.. ๊ถŒํ•œ์ด ์—†๋‹ค๋Š” ์˜ค๋ฅ˜๋„ค์š”!

๊ถŒํ•œ์„ ๋ฐ”๊ฟ”์ค˜์•ผํ•˜๋Š” ํด๋”์˜ ๊ฒฝ๋กœ๋ฅผ ์ž˜ ๋ด์ฃผ์„ธ์š”!

sudo chmod -R 777 /var/www/udemy_server_practice_springboot

๋‹ค์‹œ ๊ถŒํ•œ ๋ฐ”๊พธ๊ณ  ์„œ๋ฒ„ ์‹คํ–‰

๋”๋ณด๊ธฐ

๋‹ค์‹œ ์—…๋กœ๋“œ ํ•ด์ฃผ๊ธฐ~


๋กœ์ปฌ ํ˜ธ์ŠคํŠธ์—์„œ ์ž˜ ๋Œ์•„๊ฐ€๋Š” ๊ฒƒ์ด ๋‚ด ๋„๋ฉ”์ธ์—์„œ ์ž˜ ๋Œ์•„๊ฐ€๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ!

 

/posts/10์˜ url์— 

Body์•ˆ์—๋Š” jsonํ˜•ํƒœ๋กœ userIdx, content๋‚ด์šฉ์„ ๋ณด๋‚ด๋ฉด, content์˜ ๋‚ด์šฉ์ด ์ˆ˜์ •์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ๋ฐ์ดํ„ฐ๊ทธ๋ฆฝ์œผ๋กœ ํ™•์ธํ•œ ๊ฒฐ๊ณผ ์ž˜ ๋Œ์•„๊ฐ€๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

728x90