11-15 06:12
Recent Posts
Recent Comments
Tags
- ์๋ฐ
- Spring
- API๋ง์ผํ๋ ์ด์ค
- ์จ์ผ๋ํ
- ํ์ด์
- mysql
- ์๋์ด๋ ธ
- Naver Cloud
- linux
- ์คํฝ์ค๋น
- SQL
- ict๊ณต๋ชจ์
- RaspberryPi
- ํ์ด์๊ณต๋ชจ์
- TSQL
- API MarketPlace ๊ธ๋ก๋ฒ ์ํฌํฐ์ฆ
- ํ๋ก๋ณด๋ ธ
- DB
- ํ์ด์ฌ
- python
- ์ด๋ธ์
- ICT๋ฉํ ๋ง
- JOBํ๊ณ
- DATABASE
- Java
- ICT
- appetizer
- ์กํ๊ณ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- ์คํฝ๋ ํ
- Today
- Total
miinsun
[Spring] ํ๊ธ ํ๋ผ๋ฏธํฐ ๊นจ์ง ํด๊ฒฐ ๋ฐฉ๋ฒ ๋ณธ๋ฌธ
๐ ์์ธ : ํ๊ธ ํ๋ผ๋ฏธํฐ๋ฅผ ๋๊ฒจ api ํ ์คํธํ์ ๋ ์์ ๊ฐ์ด ํ๊ธ์ด ๊นจ์ง๋ค.
๐ ํด๊ฒฐ ๋ฐฉ๋ฒ
GET๊ณผ POST๋ฐฉ์์ด ์๋ก ๋ค๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก ํด๊ฒฐ ๊ฐ๋ฅํ๋ค.
1. POST ๋ฐฉ์ ํด๊ฒฐ ๋ฐฉ๋ฒ
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>
2. GET ๋ฐฉ์ ํด๊ฒฐ ๋ฐฉ๋ฒ
server.xml ์ถ๊ฐ
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8"/>
๐ ํด๊ฒฐ ์๋ฃ
์๋ ์ฌ์ง๊ณผ ๊ฐ์ด ํ์ํ '์ฒ'์ ์ธ์ํด ํ์ํ ๊ฐ์ ๋ฆฌํดํด์ค๋ค.
'WebApp > Spring' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Comments