๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๊ฐœ๋ฐœ์ƒํ™œ42

[์„ธ๋ฏธ๋‚˜] chat GPT ํ™œ์šฉ ํšŒ์‚ฌ์—์„œ ChatGPT ํ™œ์šฉ ์„ธ๋ฏธ๋‚˜๋ฅผ ์ง„ํ–‰ํ•ด์„œ ์ฐธ์„ํ–ˆ๋‹ค. 2์‹œ๊ฐ„์ •๋„ ์ง„ํ–‰ํ–ˆ๋Š”๋ฐ ๊ฐ€๋ณ๊ฒŒ ๋“ฃ๊ธฐ ์ข‹์•˜๊ณ  ์ฒจ ์ ‘ํ•˜๋Š” ์ž…์žฅ์—์„œ๋Š” ์งˆ๋ฌธ ํฌ์ธํŠธ๋ผ๋˜๊ฐ€ ์ƒˆ๋กญ๊ฒŒ ์•Œ์•„๊ฐ€๋Š” ๊ฒƒ๋„ ๋งŽ์•„ ์œ ์ตํ–ˆ๋‹ค. ๊ฐœ๋ฐœํ•  ๋•Œ AI๋ฅผ ์•ˆ์“ฐ๋ฉด ์ด์ œ๋Š” ์•ˆ๋  ๊ฒƒ ๊ฐ™์€ ์‹œ๊ธฐ๊ฐ€ ์˜จ ๊ฒƒ๊ฐ™๋‹ค. ์ฝ”ํŒŒ์ผ๋Ÿฟ์ด๋‚˜ GPT์˜ ๋„์›€์„ ๋ฐ›์œผ๋ฉด์„œ ๊ฐœ๋ฐœ์„ ํ•ด์•ผ์ง€ ๋„์™€์ค˜ chatGPT ํ™œ์šฉ ์„ธ๋ฏธ๋‚˜ - gpt๋ผ๋Š” ์นญ๊ตฌ๋ฅผ ์ฑ„ํŒ…์œผ๋Ÿฌ ์จ๋จน๋Š” ํˆด - ๋ชจ๋ธ์€ gpt๊ฐ€ ๋งน๊ธ€์–ด์คŒ ์–ด๋–ค ์ ‘์ ๊ณผ ๋งˆ๋ฌด๋ฆฌ๋ฅผ ๋นจ๋ฆฌํ•ด์„œ ๊ณ ๊ฐ์„ ๋นจ๋ฆฌ ๋งŒ๋‚˜๊ฒŒ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜๋‹จ์„ ๋งŒ๋“œ๋Š๋ƒ๊ฐ€ ๊ด€๊ฑด chatGPT ํ˜„์ƒํ™ฉ 1. ์ฑ—๋ด‡์œผ๋กœ ๋งˆ๋‹ˆ์”€ - ๊ทผ๋ฐ ๊ณตํ—ˆํ•จ. -> ์•ž๋’ค ๊ฒฐ๊ณผ ๋ถ™์—ฌ์„œ ๋งˆ๋ฌผ์ค‘.. 2. gpt4 - ์œ ๋ฃŒ์ธ๋ฐ ์ด๋ฏธ์ง€๊ฐ€ ์ถ”๊ฐ€๋จ - ์ง€ํ”ผํ‹ฐ์—๊ฒŒ ์ •ํ™•๋„ ์ธก๋ฉด ๊ธฐ๋Œ€ํ•˜๊ธฐ ์–ด๋ ค์šด๋ฐ 4์—์„œ ๋งˆ๋‹ˆ ์˜ค๋ฆ„ 40% ์ •๋„ - ํ”Œ๋Ÿฌ๊ทธ์ธ ๊ธฐ๋Šฅ์ด .. 2023. 5. 25.
char to int ์•„์Šคํ‚ค์ฝ”๋“œ๋ฅผ ์•Œ์•„์•ผํ•จ 1. '1' - 48; (์•„์Šคํ‚ค์ฝ”๋“œ 48์€ 0์ด๋‹ค) 2. '1' - '0' 3. Character.getNumericValue('1'); 2023. 5. 10.
google cloudresourcemanager, guava ๋ฒ„์ „ ์ถฉ๋Œ ์ด์Šˆ ์ฒ˜๋ฆฌ - NoSuchMethodError directExecutor ๋„๋ฉ”์ธ ์„ฑ๊ฒฉ์— ๋งž์ง€ ์•Š๋Š” ์ฝ”๋“œ๋ฅผ ๋‹ค๋ฅธ๋ฐ๋กœ ์˜ฎ๊ธฐ๋Š” ์ž‘์—…์„ ์ง„ํ–‰ํ–ˆ๋‹ค. ๊ตฌ๊ธ€ ํ”„๋กœ์ ํŠธ๋“ค์„ ๊ฐ€์ ธ์™€์„œ ์ธ์ฆ์„ ๋ฐ›์•„ credential์„ ์ƒ์„ฑ ํ›„ api๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๋ฐฉ์‹์ธ๋ฐ ํ”„๋กœ์ ํŠธ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ค๋Š”๋ฐ ํ•ด๋‹น dependency๋ฅผ ์‚ฌ์šฉํ–ˆ๊ณ  com.google.apis google-api-services-cloudresourcemanager v1-rev497-1.23.0 ์ธ์ฆ์„ ๋ฐ›๊ธฐ์œ„ํ•ด oauth2 dependency๋ฅผ ์‚ฌ์šฉํ–ˆ๋‹ค. com.google.auth google-auth-library-oauth2-http 1.7.0 ๊ธฐ์กด์—๋Š” ์‚ฌ์‹ค ๋‹ค๋ฅธ ๋ฆฌ์†Œ์Šค dependeny์— ๋‚ด์žฅ๋˜์–ด์žˆ๋˜ oauth2๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ๊ณ  ๋ฒ„์ „์„ ๋งž์ถฐ์„œ ์ข€ ๋‚ฎ๊ธดํ•˜์ง€๋งŒ ์ผ๋‹จ ์ •์ƒ์ ์œผ๋กœ ์ฝ”๋“œ๊ฐ€ ๋™์ž‘ํ•˜๋Š”๊ฒŒ ๋ชฉ์ ์ด์—ˆ์œผ๋‹ˆ 1.7.0์œผ๋กœ ๋˜‘๊ฐ™์ด ๊ฐ€์ ธ์™”๋‹ค. .. 2023. 4. 27.
221209 @JsonProperty Oneline TIL Checkout์— ์“ฐ๋Š”๊ฑฐ ๊ฑ ๋‚˜๋„ ๋ณด๊ด€ํ•ด๋ณด๋ ค๊ณ  page ์ƒ์„ฑํ–ˆ๋‹ค ใ„ฑใ„ฑ Jackson์ด Java class์˜ Json ์†์„ฑ์„ ํŒŒ์•…ํ•˜๊ธฐ ์œ„ํ•ด์„  Java Bean ๋ช…๋ช… ๊ทœ์น™์„ ์‚ฌ์šฉํ•œ๋‹ค. ๋Œ€๋ฌธ์ž ์‹œ์ž‘ ์นผ๋Ÿผ์„ ๋งคํ•‘ํ•ด์•ผํ•  ๊ฒฝ์šฐ @JsonProperty๋ฅผ ์‚ฌ์šฉํ•˜์ž ex) Response Mapping ..."IPProtocol": "ESP",... ... @JsonProperty private String ipProtocol; ... 2022. 12. 9.
Effective Java Study Effective Java Study ์Šคํฌ๋Ÿผ ์นœ๊ตฌ๋“ค๊ณผ ์ง„ํ–‰ํ•˜๋Š”์ค‘ 220925 ~ ํ˜ผ์ž ์ฑ…์„ ์ฝ์„ ๋•Œ๋ณด๋‹ค ํ™•์‹คํžˆ ๋„์›€์€ ๋” ๋งŽ์ด ๋˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ์žฌ๋ฐŒ๋‹น ํ™”์ดํŒ… https://github.com/now-study/study-effective-java 2023.07.06 ๋งˆ์ง€๋ง‰ ์Šคํƒ€๋”” ํ›„๊ธฐ ์˜ค ๊ทธ๋ž˜๋„ ์ฑ… ํ•œ๊ถŒ์€ ๋‹ค ๋„์—ˆ๋‹ค ์ฒจ์—๋Š” ๋‚˜๋ฆ„ ์—…๋ฌด์— ์ ์šฉํ• ๋งŒํ•œ ์˜ˆ์ œ + ์ฒ˜์Œ์˜ ์˜์ง€๋กœ ์งˆ๋ฌธ๋„ ์—ด์‹ฌํžˆ ์ดํ•ด๋„ ์—ด์‹ฌํžˆ ํ–ˆ๋Š”๋ฐ ๊ฐˆ์ˆ˜๋ก ์—…๋ฌด๋ž‘ ๊ฑฐ๋ฆฌ๊ฐ€ ์žˆ๋Š” ๋‚ด์šฉ์ด ๋‚˜์™€ ์ง‘์ค‘๋ ฅ์ด ์•ฝ๊ฐ„ ํํŠธ๋Ÿฌ ์กŒ๋‹ค. ๊ทธ๋ž˜๋„ ์ด๋Ÿด๋• ์ด๋Ÿฌ์ง€ ๋ง์•„๋ผ. ์ด๋Ÿด ๋• ์ด๋ž˜๋ผ ์ ๋‹นํ•œ ์ •๋ณด ์ •๋„๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์ค‘๊ฐ„์— ํฌ๊ธฐ ์•Š๊ณ , ์ฃผ 1ํšŒ 2-3 ์•„์ดํ…œ ์ •๋„์˜ ๊ฑฐ์˜ 1๋…„์„..ใ…Žใ…Ž ์ฒœ์ฒœํ–ˆ์ง€๋งŒ ๋๊นŒ์ง€ ํ•œ๊ถŒ ๋๋‚ธ๊ฑฐ ๋Œ€๋‹จํ•œ๊ฑฐ ๊ฐ™๋‹ค ์ด์ œ ๋‹ค์Œ ์Šคํ„ฐ๋””๋ฅผ ์‹œ์ž‘ํ•ด๋ณผ๊นŒ ์‹œ์Šค ํ™”.. 2022. 12. 1.
Select ์ฟผ๋ฆฌ ์‹คํ–‰ ์ค‘ Apparent connection leak detected Batch ๋™์ž‘ ์ค‘ Select ์ฟผ๋ฆฌ ์‹คํ–‰ํ•˜๋ฉด์„œ ๊ฐ„ํ—์ ์œผ๋กœ Leak์ด ๋‚œ๋‹ค. -> java.lang.Exception: Apparent connection leak detected ๋ฌธ์ œ๊ฐ€ ๋˜๋Š” ์ฟผ๋ฆฌ๋ฅผ ๋ฌธ์ œ๊ฐ€ ๋˜๋Š” ์กฐ๊ฑด๊ณผ ๋™์ผํ•˜๊ฒŒ Database Tool๋กœ ๋Œ๋ ค๋ณด์•˜๋‹ค. ์ฟผ๋ฆฌ ์ž์ฒด๋Š” ์‹คํ–‰์ด ๋˜๋Š”๋ฐ Output์— ๊ฒฝ๊ณ ๊ฐ€ ๋œฌ๋‹ค. -> Memory capacity of 8388608 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query. ๋ฌธ์ œ๋Š” IN์ ˆ์— ๋„˜๊ธด ํŒŒ๋žŒ ๊ฐœ์ˆ˜.. IN์ ˆ์˜ ๊ฐœ์ˆ˜๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์€ ๊ฒฝ์šฐ, Where ์กฐ๊ฑด ๋ฒ”์œ„๊ฐ€ DB์— ์ œํ•œ๋œ ๋ฉ”๋ชจ๋ฆฌ 8388608 Bytes๋ฅผ ์ดˆ๊ณผํ•œ๋‹ค. ์ด๋Ÿฐ .. 2022. 12. 1.
ObjectMapper ์‚ฌ์šฉ List Mapping ObjectMapper ์‚ฌ์šฉํ•ด์„œ List๋ฅผ ํ•œ๋ฐฉ์— ํŠน์ • ํƒ€์ž…์˜ List๋กœ ๋งคํ•‘ ์‹œํ‚ฌ ๋•Œ list list mapping import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; ... ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); //์—ฌ๊ธฐ ์„ ์–ธ ์•Š๊ณ  Model ์ชฝ์— lombok annotation ์‚ฌ์šฉํ•ด.. 2022. 11. 28.
[GCP] VM์˜ Disk, Memory ์ˆ˜์ง‘์„ ์œ„ํ•œ Ops Agent ์„ค์น˜ ์„ค์น˜ ๊ฐœ์š” ํด๋ผ์šฐ๋“œ ์ •์ฑ… ์ƒ Memory, Disk ์ •๋ณด๋Š” ๊ธฐ๋ณธ์œผ๋กœ ์ œ๊ณต์„ ํ•˜์ง€ ์•Š๋Š”๋‹ค. AWS, Azure, GCP ๋ชจ๋‘ ๋งˆ์ฐฌ๊ฐ€์ง€์ด๋ฉฐ, ํ•ด๋‹น utilization์ด๋‚˜ ๊ธฐํƒ€ ์ถ”๊ฐ€์ ์ธ ๋ฉ”ํŠธ๋ฆญ์„ ์ˆ˜์ง‘์„ ์›ํ•˜๋ฉด ๊ฐ ๋ฒค๋” ๋งˆ๋‹ค ์ง€์›ํ•˜๋Š” agent๋ฅผ ์„ค์น˜ํ•ด์„œ ์ˆ˜์ง‘์„ ์ง„ํ–‰ํ•ด์•ผํ•œ๋‹ค. GCP๋Š” ๊ธฐ์กด์— Stack Driver Agent๋ฅผ ์„ค์น˜ํ•˜๋Š” ๋“ฏ ํ–ˆ์œผ๋‚˜ ๊ณง ์ง€์› ์ข…๋ฃŒ๋กœ ๋ณด์ด๋ฉฐ, ํ˜„์žฌ๋Š” Ops Agent ์„ค์น˜๋ฅผ ๊ถŒ์žฅํ•˜๊ณ  ์žˆ๋‹ค. ๊ณตํ†ต ๊ธฐ๋ณธ ์„ค์ • Cloud Monitoring API ์‚ฌ์šฉ ์ฒดํฌ (API ํ™œ์„ฑํ™”) https://console.cloud.google.com/apis/api/monitoring/metrics ์—ญํ•  ์ƒ์„ฑ monotoring.timeSerires.create ๊ถŒํ•œ์ด ํ•„์š”ํ•˜๋‹ค ์—ญํ•  ์ถ”๊ฐ€ ์ƒ์„ฑํ•œ ์—ญํ• ์„.. 2022. 7. 30.
A fatal error has been detected by the Java Runtime Environment. Docker Alphine Image Crashed Exception ์ด์Šˆ ํŠน์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ์•ŒํŒŒ์ธ ์ด๋ฏธ์ง€ ๋ฏธ์ง€์› ์ด์Šˆ๋กœ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋œจ์ž๋งˆ๋‹ค ๋ป—์–ด๋ฒ„๋ฆผ ์›์ธ google api๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ–ˆ๊ณ , ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์ˆ˜์›”ํ•˜๊ฒŒ ํ•˜๋ ค๊ณ  bom์„ ์ถ”๊ฐ€ํ–ˆ๋Š”๋ฐ ์—ฌ๊ธฐ์•ˆ์— ์žˆ๋Š” Library์ค‘์˜ ์ผ๋ถ€๊ฐ€ Alphine ์ด๋ฏธ์ง€๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์•„์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด์Šˆ com.google.cloud libraries-bom 25.3.0 pom import ๋กœ์ปฌ์—์„œ๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š์œผ๋ฉฐ, Docker๋กœ ์˜ฌ๋ฆฐ ๊ฐœ๋ฐœ ECS ์ปจํ…Œ์ด๋„ˆ์—์„œ๋งŒ ๋ฐœ์ƒํ–ˆ๋‹ค. ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• ๊ฐ€์žฅ ๊ฐ„๋‹จํ•˜๊ฒŒ๋Š” ๊ฑ ์ด๋ฏธ์ง€ ๊ต์ฒด ์•ŒํŒŒ์ธ์ด ๊ฐ€๋ฒผ์›Œ์„œ ์ผ๋‹ค์ง€๋งŒ ์•ˆ๋œ๋‹ค๊ธฐ์— ๋‹ค๋ฅธ slimํ•œ ์ด๋ฏธ์ง€๋กœ ๊ต์ฒด -> ๋„์ปคํŒŒ์ผ ๋‚ด image ์ถ”๊ฐ€ ๋ฐ wget์ด ์•ˆ๋œ๋‹ค๊ธฐ์— ํ•ด๋‹น ๋ช…๋ น์–ด๋„ ์ถ”๊ฐ€ (as-is image : amazoncorretto:8-alpine-jre) .... 2022. 7. 25.