728x90 반응형 Springframework1 org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported 1.문제 코드 ObjectMapper objectMapper = new ObjectMapper(); String url = "http://주소.com"; // 2. set url of request HttpPost post = new HttpPost(url); // 3. set body if(body != null){ StringEntity entity = new StringEntity(objectMapper.writeValueAsString(body)); post.setEntity(entity); } // set headers as json Map headers = new HashMap(); // set headers headers.forEach((key, value)->{ log.info("heade.. 2021. 4. 22. 이전 1 다음 728x90