๐Ÿ“Œ STS3 ๊ธฐ๋ฐ˜ Spring Legacy ํ”„๋กœ์ ํŠธ ์„ค์น˜ ๋ฐ ์„ค์ • ๊ฐ€์ด๋“œ

My Pale Blue Dotยท2025๋…„ 4์›” 21์ผ
0

SPRING

๋ชฉ๋ก ๋ณด๊ธฐ
1/36
post-thumbnail

๐Ÿ“… ๋‚ ์งœ

2025-04-21


๐Ÿงญ ๋ชฉ์ฐจ

  1. STS3 ๋‹ค์šด๋กœ๋“œ
  2. STS.ini ์„ค์ •
  3. ์Šคํ”„๋ง ํ…œํ”Œ๋ฆฟ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
  4. Spring Legacy ํ…œํ”Œ๋ฆฟ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
  5. UTF-8 ์ธ์ฝ”๋”ฉ ์„ค์ •
  6. ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ํ›„ ํ†ฐ์บฃ ์—ฐ๊ฒฐ
  7. pom.xml ์„ค์ •
  8. web.xml ์ธ์ฝ”๋”ฉ ํ•„ํ„ฐ ์„ค์ •
  9. ์‹คํ–‰ ํ™•์ธ ๋ฐฉ๋ฒ•
  10. ์ฐธ๊ณ  ์ž๋ฃŒ

๐Ÿ“ ํ•™์Šต ๋‚ด์šฉ

โœ… 1. STS3 ๋‹ค์šด๋กœ๋“œ

  • GitHub ๋ฐฐํฌ ํŽ˜์ด์ง€:
    ๐Ÿ”— https://github.com/spring-attic/toolsuite-distribution/wiki/Spring-Tool-Suite-3
  • Full distribution on Eclipse 4.21 ๋ฒ„์ „ ๋‹ค์šด๋กœ๋“œ
  • ์••์ถ• ๊ฒฝ๋กœ๋Š” ํ•œ๊ธ€ ๊ฒฝ๋กœ, ๋„ˆ๋ฌด ๊ธด ๊ฒฝ๋กœ ํ”ผํ•˜๊ธฐ โ†’ C:\sts-3.9.18.RELEASE ๊ถŒ์žฅ

โœ… 2. STS.ini ์„ค์ •

-startup
plugins/org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.300.v20210828-0802
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vm
C:\jdk-11.0.2\bin\javaw.exe

-vmargs
-javaagent:lombok.jar
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Dosgi.module.lock.timeout=10

๐Ÿ’ก ์„ค๋ช…:
javaagent:lombok.jar๋Š” Lombok ์†๋„ ๊ฐœ์„  ๋ฐ ์ •์ƒ ์ž‘๋™์„ ์œ„ํ•œ ํ•„์ˆ˜ ์„ค์ •
ํ•ด๋‹น ํŒŒ์ผ์€ STS ์„ค์น˜ ๊ฒฝ๋กœ (C:\sts-3.9.18.RELEASE)์— ์œ„์น˜ํ•ด์•ผ ํ•จ


โœ… 3. ์Šคํ”„๋ง ํ…œํ”Œ๋ฆฟ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

  • ๊ฒฝ๋กœ:

    [์›Œํฌ์ŠคํŽ˜์ด์Šค]/.metadata/.plugins/org.springsource.ide.eclipse.commons.content.core
  • ๋น„์–ด ์žˆ๋‹ค๋ฉด ์•„๋ž˜ ๋งํฌ์—์„œ https-content.xml ๋‹ค์šด๋กœ๋“œ ํ›„ ๋ณต์‚ฌ
    ๐Ÿ”— https://nirsa.tistory.com/405


โœ… 4. Spring Legacy ํ…œํ”Œ๋ฆฟ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

  • ์ถ”๊ฐ€๋กœ ๋ฐ›์€ ์••์ถ• ํŒŒ์ผ ํ•ด์ œ โ†’ template.xml, template.zip, wizard.json ๊ตฌ์„ฑ

  • ๋ณต์‚ฌ ๊ฒฝ๋กœ:

    C:\Users\Administrator\Desktop\SPRING\SPRINGMY\.metadata\.sts\content\org.springframework.templates.mvc-3.2.2

โœ… 5. UTF-8 ์ธ์ฝ”๋”ฉ ์„ค์ •

  1. Window โ†’ Preferences ์ง„์ž…
  2. General โ†’ Workspace โ†’ Text file encoding: UTF-8
  3. Web โ†’ CSS / HTML / JSP / JSON: ๊ฐ๊ฐ UTF-8๋กœ ๋ณ€๊ฒฝ

โœ… 6. ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ํ›„ ํ†ฐ์บฃ ์—ฐ๊ฒฐ

  1. Servers ํƒญ์—์„œ New โ†’ Tomcat 9.0 ์„ ํƒ
  2. ํ†ฐ์บฃ ์„ค์น˜ ๊ฒฝ๋กœ ์ง€์ •: C:\apache-tomcat-9.0.xx
  3. ํฌํŠธ ๋ฒˆํ˜ธ ๋ณ€๊ฒฝ
    • HTTP: 8090
    • HTTPS: 8091

๐Ÿ“Œ ํฌํŠธ ์„ค์ • ๊ฒฝ๋กœ:
Servers ํƒญ์—์„œ ํ†ฐ์บฃ ๋”๋ธ” ํด๋ฆญ โ†’ Overview ํ™”๋ฉด โ†’ Ports ์„น์…˜

  1. ํ”„๋กœ์ ํŠธ ์ถ”๊ฐ€: Add and Remove... โ†’ ํ”„๋กœ์ ํŠธ ์ด๋™ โ†’ Finish
  2. ์„œ๋ฒ„ ์šฐํด๋ฆญ โ†’ Start

โœ… 7. pom.xml ์„ค์ •

<properties>
  <java-version>11</java-version>
  <org.springframework-version>5.0.7.RELEASE</org.springframework-version>
  <org.aspectj-version>1.6.10</org.aspectj-version>
  <org.slf4j-version>1.6.6</org.slf4j-version>
</properties>

<!-- Lombok -->
<dependency>
  <groupId>org.projectlombok</groupId>
  <artifactId>lombok</artifactId>
  <version>1.18.38</version>
  <scope>provided</scope>
</dependency>

<!-- ์ฃผ์˜: ์ถฉ๋Œ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•ด ์•„๋ž˜ runtime scope ์ฃผ์„ ์ฒ˜๋ฆฌ -->
<!-- <scope>runtime</scope> -->

๐Ÿ’ก Lombok ์ฃผ์˜์‚ฌํ•ญ

  • ๋ฐ˜๋“œ์‹œ STS/Eclipse์— Lombok ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜ ํ•„์š”
  • provided ์„ค์ •์€ ์ปดํŒŒ์ผ ์‹œ๋งŒ ์‚ฌ์šฉ
  • ์ถฉ๋Œ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•ด SLF4J ๊ด€๋ จ scope ์„ค์ •์€ ์กฐ์‹ฌ

โœ… 8. web.xml ์ธ์ฝ”๋”ฉ ํ•„ํ„ฐ ์„ค์ •

<!-- ํ•œ๊ธ€ ๋ณ€ํ™˜ ํ•„ํ„ฐ ์‹œ์ž‘ -->
<filter>
  <filter-name>encodingFilter</filter-name>
  <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  <init-param>
    <param-name>encoding</param-name>
    <param-value>UTF-8</param-value>
  </init-param>
  <init-param>
    <param-name>forceEncoding</param-name>
    <param-value>true</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>encodingFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
<!-- ํ•œ๊ธ€ ๋ณ€ํ™˜ ํ•„ํ„ฐ ๋ -->

๐Ÿ’ก <filter>๋Š” ๋ฐ˜๋“œ์‹œ <servlet> ํƒœ๊ทธ๋ณด๋‹ค ์œ„์ชฝ์— ์œ„์น˜ํ•ด์•ผ ํ•จ


โœ… 9. ์‹คํ–‰ ํ™•์ธ ๋ฐฉ๋ฒ•

  1. STS์—์„œ ํ”„๋กœ์ ํŠธ๋ฅผ Run on Server
  2. ๋ธŒ๋ผ์šฐ์ €์—์„œ http://localhost:8090/ํ”„๋กœ์ ํŠธ๋ช… ์ ‘์†
  3. ํ•œ๊ธ€์ด ์ •์ƒ ์ถœ๋ ฅ๋˜๋Š”์ง€ ํ™•์ธ
  4. ์ฝ˜์†” ์˜ค๋ฅ˜ ๋กœ๊ทธ ์—†์ด ํ†ฐ์บฃ ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜๋ฉด ์„ฑ๊ณต!

๐Ÿ”ฅ ์ •๋ฆฌ

  • STS3์€ Spring Legacy ๊ฐœ๋ฐœ์— ์ ํ•ฉํ•œ ์•ˆ์ •์ ์ธ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ
  • ํ•„์ˆ˜ ์„ค์ •: ์ธ์ฝ”๋”ฉ, ํ…œํ”Œ๋ฆฟ ๋ณต์‚ฌ, lombok ์„ค์ •, pom.xml
  • javaagent:lombok.jar, UTF-8 ํ•„ํ„ฐ ๋“ฑ์€ ์ดˆ๊ธฐ ์„ธํŒ…์—์„œ ๋ฐ˜๋“œ์‹œ ํ•„์š”
  • ํ”„๋กœ์ ํŠธ ์‹คํ–‰๊นŒ์ง€ ์ „์ฒด ํ๋ฆ„์„ ์ฒด๊ณ„์ ์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Œ

๐Ÿ”— ์ฐธ๊ณ  ์ž๋ฃŒ


profile
Here, My Pale Blue.๐ŸŒ

0๊ฐœ์˜ ๋Œ“๊ธ€