2023-05-09 1. 방법 사용 라이브러리 : Jackson: https://github.com/FasterXML/jackson GitHub - FasterXML/jackson: Main Portal page for the Jackson project Main Portal page for the Jackson project. Contribute to FasterXML/jackson development by creating an account on GitHub. github.com // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind implementation group: 'com.fasterxml.jacks..
2023-05-08 1. 방법 라이브러리 정보를 추가한다. /* 메이븐 */ com.fasterxml.jackson.core jackson-databind 2.12.3 /* 그레이들 */ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3' } @JsonInclude 어노테이션을 import 합니다. import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude 어노테이션을 DTO 클래스에 추가합니다. @JsonInclude(JsonInclude.Include.NON_NULL) public class MyDTO { private String name; pr..
2023-04-28 1. 원인 This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible. 이 예외는 객체의 동시 수정이 허용되지 않을 때 객체의 동시 수정을 탐지한 방법에 의해 발생할 수 있습니다. For example, it is not generally permissible for one thread to modify a Collection while another thread is iterating over it. In general, the results of the iteration are undefined ..
2023-04-17 1. 방법 JUnit은 독립된 환경에서의 테스트를 지원하기 때문에 테스트의 순서가 보장되지 않는다. 때문에 동일한 객체 참조가 있을 경우에는 테스트 케이스들의 순서를 보장해주어야 하는 경우가 있는데, 아래의 예제를 보자. import org.junit.FixMethodOrder; import org.junit.Test; public class TestCase1 { static int number1 = 0; @Test public void a1_test(){ number1 += 1; System.out.println("test1 =================================" + number1); } @Test public void a2_test(){ number1 += ..
2023-04-13 1. useEffect 리액트를 기존에 사용해봤으면 해당 함수가 어떠한 기능을 수행하는지 알 수 있을 것이다. 해당 함수를 첫번째 매개 값으로는 수행할 함수를 받으며, 두번째 매개 값으로는 배열을 받는데 해당 배열에 있는 값이 변경될 경우에 첫번째의 있는 함수가 실행되게 된다. 여기서 useEffect의 비교 대상은 getServersideprops 이기 때문에 첫번째 매개 변수는 fetch 형태로 백엔드 서버에서 데이터를 가져오는 함수라고 가정해보자. import React, { useState, useEffect } from 'react'; function MyComponent() { const [data, setData] = useState(null); useEffect(() =..