๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • A space that records me :)

utility5

[JAVA] ObjectUtil [2021.12.15] ์ด ํฌ์ŠคํŠธ๋Š” ์•„๋ž˜์˜ ๊ธ€์—์„œ ํŒŒ์ƒ๋˜์—ˆ๋‹ค. Object๋ฅผ Map์œผ๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ, ํŠน์ • ๊ฒฝ๋กœ์™€ ํŠน์ • ๊ฐ’์ด ์กด์žฌํ•˜๋Š”์ง€ ํŒ๋‹จํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ์ด๋‹ค. 2021.12.19 - [IT story/Spring] - [Spring] RestTemplate - Java์—์„œ HTTP ํ†ต์‹  [Spring] RestTemplate - Java์—์„œ HTTP ํ†ต์‹  [2021.12.15] ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž๋™์œผ๋กœ http ํ†ต์‹ ์„ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜์˜€๋‹ค. ์•„์ง ํ”„๋กœ์ ํŠธ ๊ธฐํš ์ „์ด๋ผ์„œ ํ•ด๋‹น ๊ธฐ๋Šฅ์— ๋Œ€ํ•ญ ์ •ํ™•ํ•œ ์„œ๋น„์Šค๊ฐ€ ๋ช…์‹œ๋˜์ง€ ์•Š์•˜์ง€๋งŒ ๊ธฐ๋ณธ ํ”Œ yjkim97.tistory.com Exception์€ ์‹ค์ œ ๊ตฌํ˜„ํ•  ๋•Œ๋Š” ์ปค์Šคํ…€ํ•œ exception์œผ๋กœ ๋‚ด๋ ธ๋‹ค. ObjectUtil.java /** * * @.. 2021. 12. 19.
[JAVA] HttpUtil [2021.12.15] ์ด ํฌ์ŠคํŠธ๋Š” ์•„๋ž˜ ๊ฒŒ์‹œ๊ธ€์—์„œ ํŒŒ์ƒ๋œ๋‹ค. Spring RestTemplate ํ†ต์‹ ํ• ๋•Œ ์‚ฌ์šฉ๋˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ์ด๋‹ค. 2021.12.19 - [IT story/Spring] - [Spring] RestTemplate - Java์—์„œ HTTP ํ†ต์‹  [Spring] RestTemplate - Java์—์„œ HTTP ํ†ต์‹  [2021.12.15] ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž๋™์œผ๋กœ http ํ†ต์‹ ์„ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜์˜€๋‹ค. ์•„์ง ํ”„๋กœ์ ํŠธ ๊ธฐํš ์ „์ด๋ผ์„œ ํ•ด๋‹น ๊ธฐ๋Šฅ์— ๋Œ€ํ•ญ ์ •ํ™•ํ•œ ์„œ๋น„์Šค๊ฐ€ ๋ช…์‹œ๋˜์ง€ ์•Š์•˜์ง€๋งŒ ๊ธฐ๋ณธ ํ”Œ yjkim97.tistory.com ํŠน์ˆ˜ํ•œ ๋„๋ฉ”์ธ์—์„œ path param, query param, request body ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ์ด๋‹ค. ๊ตฌํ˜„ ๋กœ์ง์ค‘์—์„œ Except.. 2021. 12. 19.
[JAVA] JsonUtils import java.io.IOException; import java.util.List; import java.util.Map; import org.springframework.boot.json.JsonParseException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode.. 2021. 5. 10.
[JAVA] ReflectionUtil [util] - ReflectionUtil.java package com.kt.tbb.iptv.coupon.framework.util; import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.Array; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.uti.. 2020. 11. 30.
[JAVA] ๋‘๊ฐœ Object์˜ ๊ฐ’ ๋น„๊ตํ•˜๊ธฐ Object vs Object , Map vs Map // ๋‘๊ฐœ์˜ object๋น„๊ต -> map์œผ๋กœ ์ „ํ™˜ํ›„ map ๋น„๊ต public static Map compareObject(Object obj1, Object obj2) { if(ObjectUtils.isEmpty(obj1) || ObjectUtils.isEmpty(obj2) || obj1.getClass() != obj2.getClass()) { return null; } return CommonUtils.compareMap(MapToModel.converObjectToMap(obj1), MapToModel.converObjectToMap(obj2)); } // ๋‘๊ฐœ์˜ map ๋น„๊ต public static Map compareMap(Map map1, .. 2020. 11. 19.