BackEnd37 [Spring] com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class 오류 해결 오류 com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.example.dto.ResponseCodeDto and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.HashMap["responseCodeDto"]) 해결 // 생략... responseMap.put("body", new Gson().toJson(responseCodeDto)); // return return r.. 2023. 2. 28. [JAVA] 콤마로 구분되어 저장된 String 데이터 List화 하기 List skillList = new ArrayList(); // DB에서 콤마로 구분된 String 조회. // 예시 : computer, network, OS String skills = jobApplyMapper.findSkiils(userId); if (skills != null) { // String 배열에 split 해서 담기 String[] skillsDatas = skills.split(","); // 반복문으로 list에 추가 for (int i = 0; i < skillsDatas.length; i++) { System.out.println(i); Map paramMap = new HashMap(); paramMap.put("skill", skillsDatas[i]); skillList.. 2023. 2. 21. [SpringBoot]Redundant declaration: @SpringBootApplication already applies @EnableAutoConfiguration @SpringBootApplication에 대한 공식 설명 Indicates a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning. This is a convenience annotation that is equivalent to declaring @Configuration, @EnableAutoConfiguration and @ComponentScan. 하나 이상의 @Bean 메서드를 선언하고 자동 구성 및 구성 요소 검색을 트리거하는 구성 클래스를 나타냅니다. 이는 @Configuration, @EnableAutoConfiguration .. 2023. 2. 2. [SpringBoot] 라이브러리 라이브러리 API를 기반으로 대상 환경(플랫폼)에서 바로 실행될 수 있도록 모듈화된 프로그램 모음이다. 라이브러리는 혼자서 동작하는 완전한 프로그램이 아닌, 특정한 부분 기능만을 수행하도록 제작된, 컴파일되어 기계어의 형태로 (또는 대상 플랫폼에 따라서는 바이트코드로) 존재하는 프로그램이다. 표준 라이브러리: 특정 언어의 개발 환경에 기본적으로 포함된 것들은 대부분 표준 라이브러리라고 불린다. 기본적인 기능 수행과 더불어 디버깅, 성능측정 등을 위한 별도의 API가 존재한다. 런타임 라이브러리: 프로그램이 실제 환경에서 실행되기 위해 필요한 모듈들이다. 대부분 위의 표준 라이브러리에서 기능 수행에 필요한 것들만 제공되거나, 스크립트의 실행기 등을 말한다. InteliJ의 프로젝트 내 External Li.. 2023. 1. 16. [JAVA] 클래스(class)와 생성자 Java의 기본 개념과 문법을 한번 더 정리했다. 1. class란 객체를 생성하기 위한 필드와 메소드가 정의되어 있는 곳으로, 클래스로부터 만들어진 객체를 해당 클래스의 인스턴스(instance)라고 한다. 그리고 클래스로부터 객체를 만드는 과정을 인스턴스화 라고 한다. 2. class 선언 사용하고자 하는 객체를 구상했다면 그 객체의 대표 이름을 하나 결정하고 이것을 클래스 이름으로 한다. "클래스이름.java"로 소스 파일을 생성한다. Car.java public class Car { } 두 개 이상의 클래스가 선언된 소스 파일을 컴파일 하면 바이트 코드 파일은(.class) 클래스를 선언한 개수 만큼 각각 생성된다. 다만, 파일 이름과 동일한 이름의 클래스 선언에만 public 접근 제한자를 붙일.. 2023. 1. 14. 이전 1 2 3 4 5 6 ··· 8 다음 반응형