๋ฐ์ํ jackson-databind2 [JAVA] VO๋ฅผ JSON ๋ฐ์ดํฐ๋ก ๋ณํ (java class to json, vo to json) ๋จผ์ ์๋ ํฌ์คํ ์ ๋ณด๊ณ ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํ์! [JAVA] JSON ๋ฐ์ดํฐ๋ฅผ VO๋ก ํ์ฑ, ๋ณํํ๋ ๋ฐฉ๋ฒ (json to java class) ๋จผ์ jackson-databind ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํด์ฃผ์ด์ผ ํ๋ค! spring boot์ ๊ฒฝ์ฐ 'spring-boot-starter-web'์ ํฌํจ๋์ด ์์ maven com.fasterxml.jackson.core jackson-databind 2.13.0 gradle // https://mvnrepos.. ynzu-dev.tistory.com vo ์์ public class TestVo { @JsonProperty("user-name") private String userName; @JsonProperty("user-id") private Stri.. 2021. 12. 9. [JAVA] JSON ๋ฐ์ดํฐ๋ฅผ VO๋ก ํ์ฑ, ๋ณํํ๋ ๋ฐฉ๋ฒ (json to java class) ๋จผ์ jackson-databind ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํด์ฃผ์ด์ผ ํ๋ค! spring boot์ ๊ฒฝ์ฐ 'spring-boot-starter-web'์ ํฌํจ๋์ด ์์ maven com.fasterxml.jackson.core jackson-databind 2.13.0 gradle // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.0' ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ถ๊ฐํ์ผ๋ฉด ์ด ๋์ค๋ก ์ฝ๊ฒ ํ์ฑ์ด ๊ฐ๋ฅํ๋ค! ObjectMapper mapper = new ObjectM.. 2021. 12. 9. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ