본문 바로가기

BackEnd36

[JAVA] Calendar 클래스 / 오늘 날짜 구하기 / 이번 달의 첫번째 날 / 이번 달의 마지막 날 / 현재로부터 과거까지 역순 데이트 리스트 출력 https://docs.oracle.com/javase/8/docs/api/java/util/Calendar.html Calendar (Java Platform SE 8 ) Adds or subtracts (up/down) a single unit of time on the given time field without changing larger fields. For example, to roll the current date up by one day, you can achieve it by calling: roll(Calendar.DATE, true). When rolling on the year or Calendar.YE docs.oracle.com 공식문서를 보고 필요한 부분을 번역해서 정리 했습니.. 2023. 5. 10.
[JAVA] POJO (Plain Old Java Object) 이글의 목차 What Is a POJO? 이상적인 POJO POJO를 지향하게 되다. Feat. EJB(Enterprise JavaBeans) POJO 프레임워크 POJO 기반의 코드인지 아닌지 확인하는 두 가지 기준 진정한 POJO란 Baeldung의 What is a POJO Class? 를 번역해서 정리한 글입니다. (구글링한 내용을 추가로, 이해하기 쉬운 순서로 편집했습니다. 항상 단어가 어렵네요~) https://www.baeldung.com/java-pojo-class#what-is-a-pojo 1. What Is a POJO? "a *straightforward type / with no references to any particular frameworks. A POJO has no nam.. 2023. 3. 7.
[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.