μ€νλ§ νλ μμν¬ κ°λ°νκ²½ μΈν
μ€νλ§ νλ μμν¬ κ°λ°νκ²½μ μΌλ°μ μΌλ‘ 2κ°μ§ λ°©λ²μΌλ‘ μΈν
νλ€.
β’
STS μ€μΉ
β’
μ΄ν΄λ¦½μ€ νμ₯ μ€μΉ(Marketplace)
μ΄ κΈμ μ°λ μμ (2023-10)μμ μ΄ν΄λ¦½μ€ μ΅μ λ²μ μμ νμ₯ μ€μΉλ₯Ό νμ¬ sts μ€μΉνλ©΄ μ¬λ¬κ°μ§ λ²κ·Έλ μ€λ₯κ° λ°μνλ μ΄μκ° λ§λ€.
STS μ€μΉνμΌμ λ€μ΄λ°μ μ€μΉνλλ‘ νλ€.
STS λ€μ΄λ‘λ
JVM λ²μ 1.8.0_202λ μ΄ μ νμ μ ν©νμ§ μμ΅λλ€. λ²μ 11 μ΄μμ΄ νμν©λλ€.
Vesion 1.8.0_202 of the JVM is not suitable for this product. Version: 11 or greater is required.
ν΄κ²°
β’
STS.ini νμΌ μμ
-vm
C:\Program Files\Java\jdk-11\bin\javaw.exe
Plain Text
볡μ¬
μμ μ½λλ₯Ό μΆκ°νλλ°, μ΄ λ μ§μ ν κ²½λ‘λ VM(κ°μλ¨Έμ ) JDK κ²½λ‘ μ΄λ€.
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:\Program Files\Java\jdk-11\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Dosgi.module.lock.timeout=10
Plain Text
볡μ¬
Spring MVC λ©λ΄κ° λμ€μ§ μλλ€λ©΄?
C:\workspace\.metadata\.plugins\org.springsource.ide.eclipse.commons.content.core
Plain Text
볡μ¬
μμ κ²½λ‘μ μλ νμΌμ μΆκ°νκ³ sts λ₯Ό μ¬μ€νμ£ΌμΈμ~!
Spring MVC κ° λ€μ΄λ‘λ λμ§ μλ κ²½μ°
μλμΌλ‘ mvc ν
νλ¦Ώ νμΌμ λ€μ΄λ‘λ λ°μμ μλ κ²½λ‘μ λ£μ΄μ€λ€.
.metadata\.sts\content\org.springframework.templates.mvc-3.2.2
Plain Text
볡μ¬
κΈ°λ³Έ μ€μ
β’
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>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Java
볡μ¬
β’
home.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<html>
<head>
<title>Home</title>
</head>
<body>
<h1>
Hello world!
</h1>
<P> The time on the server is ${serverTime}. </P>
</body>
</html>
HTML
볡μ¬