๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ–ฅ๏ธ Web

[Spring ํ™˜๊ฒฝ ์„ค์ •] STS, Tomcat ๋ฐ MVC ํ”„๋กœ์ ํŠธ ์„ค์น˜

by Luvbit 2024. 6. 27.

์˜ค๋Š˜์€ ์Šคํ”„๋ง ํ™˜๊ฒฝ ๊ตฌ์ถ•์„ ์œ„ํ•ด STS์™€ Tomcat์„ ์„ค์น˜ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 
Window ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์œผ๋‹ˆ ์ฐธ๊ณ  ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
์ฐจ๊ทผ์ฐจ๊ทผ ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๐Ÿ˜Š
 
 

1๏ธโƒฃ https://spring.io/tools ์ ‘์†

 
 
2๏ธโƒฃ Spring Tool Suite 3 wiki ํด๋ฆญ

 
 
 
3๏ธโƒฃ ๋‹ค์šด๋กœ๋“œ ํด๋ฆญ

 

 
 
 
4๏ธโƒฃ ์••์ถ•์„ ํ’€์–ด์ค๋‹ˆ๋‹ค.
- ํ˜น์‹œ STS ์••์ถ• ํ•ด์ œ์ค‘์— ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ๋ฐ˜๋””์ง‘์„ ์„ค์น˜ํ•˜์—ฌ ์••์ถ•์„ ํ’€์–ด์ค๋‹ˆ๋‹ค.

 


 
๐Ÿ’™ bandizip
 
1. https://www.bandisoft.com/bandizip/dl/ ์ ‘์†
 
2. ์••์ถ•ํŒŒ์ผ ์—ด๊ธฐ ํด๋ฆญ

 
3. ์•„๊นŒ ๋‹ค์šด ๋ฐ›์€ ํŒŒ์ผ ํด๋ฆญ ํ›„ ์›ํ•˜๋Š” ํด๋”์— ์••์ถ• ํ’€๊ธฐ
 

๐Ÿฉต ํ˜น์‹œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋ฉด ๋ฐ˜๋””์ง‘์„ ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰ํ•ด์ฃผ์„ธ์š”!
 


 
 
5๏ธโƒฃ ์••์ถ•์„ ํ‘ผ ํ›„ spring-tool-suite-3.9.18.RELEASE-e4.21.0-win32-x86_64\sts-bundle\sts-3.9.18.RELEASE
     ๊ฒฝ๋กœ์•ˆ์— ์žˆ๋Š” STS.exe๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
 

 
 
 
6๏ธโƒฃ Launch๋ฅผ ํด๋ฆญํ•ด์ค๋‹ˆ๋‹ค.
 

 
 
 
7๏ธโƒฃ ์ •์ƒ ์„ค์น˜ ํ™”๋ฉด์ž…๋‹ˆ๋‹ค.

 
๐Ÿฉต ํ˜น์‹œ Dashboard๊ฐ€ ๋œจ๋ฉด ์ •์ƒ์ ์œผ๋กœ ์„ค์น˜๊ฐ€ ๋˜์‹  ๊ฑฐ๋ฉฐ, ์•ˆ๋œฐ๊ฒฝ์šฐ ์ง€๊ธˆ๊นŒ์ง€ ์ง„ํ–‰ ๊ณผ์ •์„ ๋‹ค์‹œ ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ˜ญ 
 
8๏ธโƒฃ ์ด์ œ ์•„๋ž˜์˜ ํŒŒ์ผ์„ ์„ค์น˜ํ•ด ์ฃผ์„ธ์š”.

https-content.xml
0.02MB

 
๐Ÿ’™ ํŒŒ์ผ๋ช…์ด ๋ณ€๊ฒฝ๋˜๋ฉด ์—๋Ÿฌ๊ฐ€ ๋‚  ์ˆ˜ ์žˆ์œผ๋‹ˆ ๋ณ€๊ฒฝํ•˜์‹œ๋ฉด ์•ˆ ๋ฉ๋‹ˆ๋‹ค.
 
9๏ธโƒฃ ๋ฌธ์„œ - workspace-sts-3.9.18.RELEASE๋กœ ๊ฐ€์ค๋‹ˆ๋‹ค.
    ํ˜น์‹œ ์ด ํด๋”๋ช…์ด ์—†์„ ๊ฒฝ์šฐ ์„ค์น˜ ์‹œ workspace๋ฅผ ์ง€์ •ํ•œ ํด๋”๋กœ ์ด๋™ํ•ด ์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

 
์ด ๊ฒฝ๋กœ๋กœ ๋“ค์–ด๊ฐ€์„œ https-context.xml์„ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.
 
 
๐Ÿ”Ÿ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋‚˜ ์ƒ์„ฑํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. other๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.
 

 
 
 
Spring Legacy Project๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 
 
 
Spring MVC Project๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

โš ๏ธ ํ˜น์‹œ Simple Projects ํ•˜๋‹จ์˜ ํŒŒ์ผ๊ณผ ํด๋”๋“ค์ด ์•ˆ ๋ณด์ผ ๊ฒฝ์šฐSTS.exe๋ฅผ ๊ป๋‹ค ์ผœ์ฃผ์„ธ์š”!
 
 
 
ํ”„๋กœ์ ํŠธ๋ช…์„ ์ž…๋ ฅํ•˜๊ณ , MVC Project๋ฅผ ํด๋ฆญํ•œํ›„ next๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”

 
" Spring MVC Project requires a download of 16608 bytes. Proceed? "
" Yes " ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.
 

 
1๋ถ„ ์ •๋„ ๊ธฐ๋‹ค๋ ค์ฃผ์‹  ํ›„, Next๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ํ•˜๋‹จ์˜ ์ฐฝ์ด ๋œฐ ๊ฒ๋‹ˆ๋‹ค.
 
 
 
 
์  2๊ฐœ๋งŒ ํฌํ•จํ•ด์„œ ์›ํ•˜๋Š” ๋ฌธ๊ตฌ๋ฅผ ์ž…๋ ฅํ•ด ์ค๋‹ˆ๋‹ค. ์ €๋Š” โ€œkr.soft.studyโ€ ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค.
์ด๋Š” ๋‚˜์ค‘์— ์ปจํŠธ๋กค๋Ÿฌ ๋“ฑ ์ž๋ฐ” ํŒŒ์ผ๋“ค์„ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. ํŒจํ‚ค์ง€ ๊ฒฝ๋กœ๊ฐ€ ๋˜๋ฉฐ, ํฌ๋งํ•˜์‹œ๋Š” ๊ฑธ๋กœ ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 
์ด์ œ Finish๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.
 
 
1๏ธโƒฃ1๏ธโƒฃ ํ•˜๋‹จ Servers์˜ VMware... ์„ ์˜ค๋ฅธ์ชฝ๋งˆ์šฐ์Šค๋ฅผ ํด๋ฆญํ•˜์—ฌ Delete ํ•ด์ค๋‹ˆ๋‹ค.

1๏ธโƒฃ2๏ธโƒฃ Tomcat ์„ค์น˜
 
1. ์‚ฌ์ดํŠธ ์ ‘์†
https://tomcat.apache.org/

 
 
2. ํ•ด๋‹น ๋ฒ„์ „์œผ๋กœ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 
3. ์ €๋Š” jdk-11 ์‚ฌ์šฉ ์˜ˆ์ •์ด์–ด์„œ ํ•ด๋‹น ๊ฒฝ๋กœ๋กœ ์„ ํƒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
 

 
4. ์„ค์น˜ ํ›„ ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ํ•˜๋ฉด ์˜ค๋ฅธ์ชฝ ํ•˜๋‹จ์— ์•„๋ž˜์™€ ๊ฐ™์€ ์•„์ด์ฝ˜์ด ์ƒ๊น๋‹ˆ๋‹ค. start Service๋ฅผ ํ•ด์ค๋‹ˆ๋‹ค.

 
5. Chrome์— localhost:8080์„ ์ž…๋ ฅํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ์ฐฝ์ด ๋œฐ ๊ฒ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์ •์ƒ ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
 

 
 
 
1๏ธโƒฃ3๏ธโƒฃ ์‚ญ์ œ ํ›„์— ์•„๋ž˜์˜ ๋ฒ„ํŠผ์ด ์ƒ๊ธฐ๋ฉด ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 
 
Apache์—์„œ Tomcat v9.0 Server๋กœ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

 
 
Browse๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์‹  ํ›„ Tomcat ์„ค์น˜ํ•œ ๊ณณ์œผ๋กœ ๊ฐ‘๋‹ˆ๋‹ค. ๋”ฐ๋กœ ์ €์žฅ ๊ฒฝ๋กœ๋ฅผ ์ •ํ•˜์‹œ์ง€ ์•Š์•˜๋‹ค๋ฉด ์•„๋ž˜ ๊ฒฝ๋กœ์— ์žˆ์„ ๊ฒ๋‹ˆ๋‹ค.

 
 
 
add๋กœ ์˜ฎ๊ฒจ์ค€ ํ›„ Finish๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 
 
 
 
1๏ธโƒฃ4๏ธโƒฃ ์ƒ์„ฑ๋œ ์„œ๋ฒ„๋ฅผ ๋”๋ธ”ํด๋ฆญ ํ•ด์ฃผ์‹œ๋ฉด ์•„๋ž˜์˜ ์ฐจ์ด ๋œน๋‹ˆ๋‹ค. Port Number๊ฐ€ ์—†๋‹ค๋ฉด ์ž„์˜๋กœ ์ง€์ •ํ•ด ์ฃผ์„ธ์š”.
 

 
 
1๏ธโƒฃ5๏ธโƒฃ ์ด์ œ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 
 
next, Finish ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

 
1๏ธโƒฃ6๏ธโƒฃ ์•„๋ž˜์ฒ˜๋Ÿผ ๋œฐ๊ฒฝ์šฐ ํ™˜๊ฒฝ์„ค์ • ์™„๋ฃŒ์ž…๋‹ˆ๋‹ค!
 

 
1๏ธโƒฃ7๏ธโƒฃ ํ”„๋กœ์ ํŠธ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ X ๋œจ๋Š” ๊ฑธ ์—†์• ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Configure Build Path๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.
 

 
 
๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์‹  ํ›„ Add Library๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 
 
 
Server Runtime์„ ๋ˆ„๋ฅด์‹  ํ›„ Next๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

 
 
 
Apache Tomcat์„ ๋ˆ„๋ฅด๊ณ  Finish๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์‹  ํ›„, Apply and Close๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

 
 
Server๋ฅผ ์ดํด๋ฆฝ์Šค์—์„œ ์ œ๋Œ€๋กœ ๋ชป ๋ถˆ๋Ÿฌ์˜จ ๊ฑธ ์žก์•„์คฌ๊ธฐ ๋•Œ๋ฌธ์— x์ž๊ฐ€ ์—†์–ด์กŒ์„ ๊ฒ๋‹ˆ๋‹ค.
์ด์ œ ์ •์ƒ์ ์œผ๋กœ ์Šคํ”„๋ง ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์“ธ ์ค€๋น„๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ด์ œ MVC Project๋ฅผ ์ž์œ ๋กญ๊ฒŒ ์ง„ํ–‰ํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
 
 
 
 
 

๐ŸŽ‰๋”ฐ๋ผ์˜ค์‹œ๋Š๋ผ ๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!๐ŸŽ‰

์งˆ๋ฌธ์€ ์–ธ์ œ๋“ ์ง€ ๋Œ“๊ธ€์— ๋‚จ๊ฒจ์ฃผ์„ธ์š”.
๐Ÿฉต๐Ÿฐ๐Ÿฉต