https://imgonna.tistory.com/24
여러 textarea로 글 작성했을 때 db로 보내는 방법
@RestController에 작성 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 @PostMapping("/write") public String write2(@RequestBody List contents, HttpServletRequest request) { int result = 0; HttpSession session = request.g
imgonna.tistory.com
다른 환경에서 구현했는데 에러가 뜬다.
알고 보니!!
pom.xml에 Jackson 라이브러리를 추가 안해줬다.
1
2
3
4
5
6
7
8
9
10
11
|
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
|
cs |
이거 추가하기.
Spring Boot의 경우, 이러한 설정이 기본적으로 제공된다고 한다.
'SPRING' 카테고리의 다른 글
java.lang.IllegalStateException: Ambiguous mapping (0) | 2023.08.18 |
---|---|
압축파일로 스프링 프로젝트 불러오기 (0) | 2023.08.17 |
org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/pro1/index] in DispatcherServlet with name 'appServlet' (0) | 2023.08.16 |
여러 textarea로 글 작성했을 때 db로 보내는 방법 (0) | 2023.08.12 |
mapper.xml이 화면에 파란색, 검정색으로만 나올 때 (0) | 2023.08.11 |