티스토리 뷰
728x90
반응형
pom.xml에 아래의 내용 추가
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.1.1</version>
</dependency>
spring-servlet.xml 에 아래의 내용 추가
<mvc:annotation-driven> <!-- @EnableMvc -->
<mvc:message-converters>
<!-- json 메세지 컨버터 -->
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>application/json; charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
728x90
반응형
'Spring' 카테고리의 다른 글
[Spring & Redis] Spring & Redis 연동 (0) | 2019.08.25 |
---|---|
[Spring] The prefix "p" for attribute "p:order" associated with an element type "bean" is not bound. (0) | 2019.08.25 |
[Spring] JAI를 이용하여 썸네일 이미지 등록 (0) | 2019.05.13 |
StandardServletMultipartResolver 설정 (0) | 2019.04.29 |
SLF4J Log 설정 (0) | 2019.04.27 |
댓글