728x90

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ 168

cannot find symbol method builder() ์—๋Ÿฌ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

์ƒํ™ฉ builder() ํ•จ์ˆ˜๋ฅผ ์ฐพ์ง€ ๋ชปํ•œ๋‹ค๊ณ  ๋œจ๋Š” ์–ด์ด์—†๋Š” ์—๋Ÿฌ๋ฅผ ๋ณด๊ณ  ๋‹นํ™ฉํ–ˆ์Šต๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ ๋‚ด๋‚ด lombok์„ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ, ํ…Œ์ŠคํŠธ ํ•˜๋ ค๋‹ˆ๊นŒ ์ฐพ์ง€ ๋ชป ํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์›์ธ lombok ์˜์กด์„ฑ ์ค‘ test ๊ด€๋ จ ์˜์กด์„ฑ์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์Œ (๋‹น์—ฐํžˆ ์žˆ์„ ์ค„ ์•Œ์•˜๋Š”๋ฐ) lombok ์˜์กด์„ฑ ์ถ”๊ฐ€ํ•  ๋•Œ ์ˆœ์„œ์˜ ์ค‘์š”์„ฑ์„ ๊ณ ๋ คํ•˜์ง€ ์•Š์Œ ํ•ด๊ฒฐ build.gradle compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' ๋ฐ˜๋“œ์‹œ annotationProcessor (testAnnotationProcessor)๋ณด๋‹ค compileOnl..

Spring Security 6.x ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ํ›„ continue ํŒŒ๋ผ๋ฏธํ„ฐ ๋ถ™๋Š” ํ˜„์ƒ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•๊ณผ ์›์ธ

์ƒํ™ฉ ๊ธฐ์กด Spring Security 5.x ๋ฒ„์ „์„ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•ด์„œ Spring Security 6.1 ๋ฒ„์ „์œผ๋กœ ์ƒˆ๋กญ๊ฒŒ ๋นŒ๋“œํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ณ„๋„ ์—๋Ÿฌ๋Š” ์—†์—ˆ์œผ๋‚˜ ๊ธฐ์กด์— ๋ชป ๋ดค๋˜ ์ด์ƒํ•œ continue ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ๋ถ™์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์›์ธ ๊ณต์‹ docs์—์„œ ์•Œ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. Spring Security 5.x ๋ฒ„์ „์—์„œ๋Š” ๋ชจ๋“  ์š”์ฒญ์— โ€‹โ€‹๋Œ€ํ•ด ๊ธฐ๋ณธ๊ฐ’์ด null์ด๋‹ค ๋ณด๋‹ˆ ์•ˆ์ •์„ฑ ์ธก๋ฉด์—์„œ ์ข‹์ง€ ๋ชปํ•˜๊ณ  ํŒ๋‹จํ•˜์—ฌ 6.x ๋ฒ„์ „์—์„œ๋Š” ๊ธฐ๋ณธ๊ฐ’์„ continue๋กœ ์„ค์ •๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์ƒ๊ธด๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์žฌ์ •์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. HttpSessionRequestCache requestCache = new HttpSessionRequestCache(); requestCache.setMatchin..

java.lang.IllegalArgumentException: This method cannot decide whether these patterns are Spring MVC patterns or not ์—๋Ÿฌ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

์ƒํ™ฉ Caused by: java.lang.IllegalArgumentException: This method cannot decide whether these patterns are Spring MVC patterns or not. If this endpoint is a Spring MVC endpoint, please use requestMatchers(MvcRequestMatcher); otherwise, please use requestMatchers(AntPathRequestMatcher). This is because there is more than one mappable servlet in your servlet context: {org.h2.server.web.JakartaWebServl..

java.lang.NumberFormatException: For input string ์—๋Ÿฌ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

์ƒํ™ฉ Spring + Mybatis ํ™˜๊ฒฝ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ ๋ฌธ์ž์—ด์„ ๋น„๊ตํ•˜๋Š” ๋ถ€๋ถ„์—์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์Œ ๋ฌธ์ž์—ด๋ผ๋ฆฌ์˜ ๋น„๊ต์ž„์—๋„ NFE๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์Œ ์›์ธ Mybatis์—์„œ , ํƒœ๊ทธ์˜ test ์†์„ฑ์—์„œ ๋ฌธ์ž์—ด์„ ๋น„๊ตํ•˜๋Š” ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ž…๋‹ˆ๋‹ค. ์ž…๋ ฅ๋œ ๊ฐ’์„ ๋ฌธ์ž์—ด๊ณผ ๋น„๊ตํ•  ๋•Œ storeCd != '0'์—์„œ storeCd๋Š” String์ธ๋ฐ '0'์€ char๋กœ ์ธ์‹ํ•ด์„œ ๊ฐ™์€ ์ž๋ฃŒํ˜•์ด ์•„๋‹ˆ๋ผ์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ž…๋‹ˆ๋‹ค. Mybatis ๋ฌธ์ œ๋Š” ์•„๋‹ˆ๊ณ  OGNL(Object Graph Navigation Language)์˜ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. OGNL ์ธํ„ฐํ”„๋ฆฌํ„ฐ์—์„œ๋Š” ๋”ฐ์˜ดํ‘œ์™€ ๋ฌธ์ž์˜ ๊ฐฏ์ˆ˜์— ๋”ฐ๋ผ ์ธ์‹ํ•˜๋Š” ์ž๋ฃŒํ˜•์ด ์•„๋ž˜์™€ ๊ฐ™์ด ๋‹ค๋ฆ…๋‹ˆ๋‹ค. '1', 'A' → char ํ˜• 'AAA', "A" → String ํ•ด๊ฒฐ 1. ์Œ๋”ฐ..

DTO ํด๋ž˜์Šค๋ฅผ ์–ด๋–ค ๊ธฐ์ค€์œผ๋กœ ์ƒ์„ฑํ•ด์•ผ ์ข‹์„๊นŒ?

DTO ํด๋ž˜์Šค๋ฅผ ์–ด๋–ค ๊ธฐ์ค€์œผ๋กœ ๋งŒ๋“ค์–ด์•ผํ• ์ง€ ๊ณ ๋ฏผ์ด ์ƒ๊ฒผ์Šต๋‹ˆ๋‹ค. ์ฃผ๋ณ€ ๋„ค์ด๋ฒ„, ์นด์นด์˜ค ๊ฐœ๋ฐœ์ž ์นœ๊ตฌ๋“ค์˜ ์˜๊ฒฌ๊ณผ ์ €์™€ ๊ฐ™์€ SI/SM ๊ธฐ์—… ๊ฐœ๋ฐœ์ž์˜ ์˜๊ฒฌ์ด ์‚ฌ๋ญ‡ ๋‹ฌ๋ผ์„œ ์ •๋ฆฌํ•˜๊ณ ์ž ๊ธ€์„ ์ž‘์„ฑํ•ด๋ด…๋‹ˆ๋‹ค. DTO ํด๋ž˜์Šค๋ฅผ ๋ชฉ์ ๋งˆ๋‹ค ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด์•ผ ํ•œ๋‹ค ! ๊ฒŒ์‹œํŒ ๊ธฐ๋Šฅ์„ ๋งŒ๋“ ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด๋ณด๋ฉด ๊ฒŒ์‹œ๊ธ€ ๋“ฑ๋ก/์ˆ˜์ •/์‚ญ์ œ ๊ธฐ๋Šฅ๊ณผ ๋Œ“๊ธ€ ๋“ฑ๋ก/์ˆ˜์ •/์‚ญ์ œ ๋“ฑ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ ๊ตฌํ˜„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๊ธฐ๋Šฅ๋ณ„๋กœ DTO ํด๋ž˜์Šค๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” ๋ช…ํ™•ํ•œ ๋ชฉ์ ์ด ์žˆ์–ด ๋‹ค๋ฅธ API์˜ ์š”์ฒญ์ด๋‚˜ ์‘๋‹ต์— ์˜ํ–ฅ์ด ์—†๋‹ค๋Š” ์žฅ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, ํด๋ž˜์Šค๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์•„์ ธ์„œ ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ์–ด๋ ต๋‹ค๋Š” ๋‹จ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ์ œ๊ฐ€ ๊ฐœ์ธ์ ์œผ๋กœ ํ–ˆ๋˜ ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉํ–ˆ๋˜ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ๋ฌด์–ธ๊ฐ€ ํŒŒ์ผ์ด ๋งŽ์•„์ง€๋ฉด์„œ ์žˆ์–ด๋ณด์ด๋Š” ํ”„๋กœ์ ํŠธ๊ฐ€ ๋˜๋Š” ๊ฒƒ์ด ๋งค๋ ฅ์ ์ด๋ผ ์ƒ๊ฐ์ด ๋“ญ..

Swag ๋„˜์น˜๊ฒŒ ์†Œํ†ตํ•ด๋ณด์ž! Swagger in SpringBoot 3.x ์ •๋ณต (SpringFox, SpringDoc, API ๋ฌธ์„œ ์ž๋™ํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•)

์˜ค๋žœ๋งŒ์— ํฌ์ŠคํŒ…ํ•˜๋Š” ์ด์œ ๋Š” ํ•œ๋™์•ˆ ๋ณ„ ํƒˆ ์—†์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์ด์–ด๊ฐ€๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์—.. ์ƒˆ๋กญ๊ฒŒ ๋ฌด์–ธ๊ฐ€๋ฅผ ์•Œ์•„๊ฐ€๊ฑฐ๋‚˜ ๋ณต์Šตํ•˜๋Š” ์ผ์ด ์ ์—ˆ์Šต๋‹ˆ๋‹ค..^^ ์˜ค๋Š˜์€ Swaager ์‚ฌ์šฉ ๋„์ค‘์— ๊ถ๊ธˆํ•œ ์ ์ด ๋งŽ์•„์ง€๋ฉด์„œ ์กฐ์‚ฌํ•œ ๋‚ด์šฉ๋“ค์„ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์„ ํฌ์ŠคํŒ…ํ•ด๋ณด๋ ค ํ•ฉ๋‹ˆ๋‹ค. Swagger ๋“ฑ์žฅ ์ „๊ณผ ํ›„ ์ฐจ์ด๋Š”? Swagger๊ฐ€ ์„ธ์ƒ์— ๋“ฑ์žฅํ•˜๊ธฐ ์ „, ๊ฐœ๋ฐœ์ž ๊ฐ„ ์†Œํ†ต ๋ฐฉ์‹์€ ๋‹จ์ˆœํ•˜๊ฒŒ ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๊ฐ€ URL ๋ฐ Request, Response๋ฅผ ์ง์ ‘ ๋ฌธ์„œํ™”ํ•ด์„œ ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๊ธฐ๋Šฅ ๊ตฌํ˜„์„ ์œ„ํ•œ API ๋ช…์„ธ ๋ฐ ์š”๊ตฌ์‚ฌํ•ญ์ด ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ–ˆ์„ ๋•Œ, ๊ฐ ๊ฐœ๋ฐœ์ž ๊ฐ„์˜ ํ•„์—ฐ์ ์ธ ์ฑ…์ž„์ด ๋”ฐ๋ฆ…๋‹ˆ๋‹ค. ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๋Š” API ๊ตฌํ˜„์— ์žˆ์–ด์„œ ์–ด๋– ํ•œ ์‹ค์ˆ˜๊ฐ€ ์—†์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๋Š” ๊ธฐ๋Šฅ ์š”๊ตฌ์‚ฌํ•ญ์„ ์™„๋ฒฝํžˆ ์ด..

[Git] Github Action์œผ๋กœ ์ž๋™์œผ๋กœ ์ž”๋”” ๋งŒ๋“ค์–ด์ฃผ๊ธฐ (Grass Generator Workflow)

์ž๋™์œผ๋กœ ์ž”๋”” ์‹ฌ๋Š” GG (Grass Generator) ๐Ÿคฃ ๋ˆ„๊ตฌ๋‚˜ ์‚ด๋‹ค๋ณด๋ฉด ๋งŒ์‚ฌ๊ฐ€ ๊ท€์ฐฎ์•„์งˆ ๋•Œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.. ๊ทธ๋Ÿผ์—๋„ ๋‹ค์งํ–ˆ๋˜ ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•œ ๋…ธ๋ ฅ์ด ๋ฌด๋„ˆ์งˆ๊นŒ๋ด ๊ฒŒ์œผ๋ฆ„์„ ์ด๊ฒจ๋‚ด๋Š” ์‚ฌ๋žŒ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ทจ์ค€ ๋‹น์‹œ ๊ฐ€์žฅ ๋ถ€์ง€๋Ÿฐํ•œ ๋ชฉํ‘œ์˜€๋˜ '1์ผ 1์ปค๋ฐ‹'์œผ๋กœ ์ž”๋””๋ฅผ ๋ฌด๋Ÿญ๋ฌด๋Ÿญ ์ž๋ผ๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ๋ชฉํ‘œ์˜€๋Š”๋ฐ, ์‹œ๊ฐ„์ด ์ง€๋‚˜๊ณ  ํšŒ์‚ฌ ์ผ์— ์น˜์—ฌ์„œ ์ž”๋””๋ฐญ์€ ์ปค๋…• ํƒˆ๋ชจ๊ฐ€ ์™”์Šต๋‹ˆ๋‹ค. ๋ฌผ๋ก  ์—ด์‹ฌํžˆ ํ•ด์•ผํ•˜๋Š”๊ฑธ ์•Œ์ง€๋งŒ ^^ ์ œ๊ฐ€ ๋ฏธ์ณ ์ปค๋ฐ‹ํ•˜์ง€ ๋ชปํ•œ ๋‚ ์ด ๋ฐœ์ƒํ•  ๋•Œ ์ž”๋””๊ฐ€ ๋น ์ ธ์žˆ์ง€ ์•Š๋„๋ก ์ž๋™์œผ๋กœ ์ปค๋ฐ‹ํ•ด์ฃผ๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ค๋ฉด ์ฐธ ํŽธํ•˜๊ฒ ๋‹ค๊ณ  ์ƒ๊ฐํ•ด์„œ ๋งŒ๋“ค๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฆ„ํ•˜์•ผ... GG... Github Action Workflow ์ž‘์„ฑํ•˜๊ธฐ ๋นˆ ํ”„๋กœ์ ํŠธ๋ฅผ Github์—์„œ ํŽธํ•˜๊ฒŒ ์•„๋ฌด๋ ‡๊ฒŒ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. set up a workflow yours..

App ๋ฒ„์ „ ๊ด€๋ฆฌ์˜ ํ•„์š”์„ฑ - ์‹œ๋งจํ‹ฑ ๋ฒ„์ „ ๊ด€๋ฆฌ (Sementic Versioning)

ํšŒ์‚ฌ์—์„œ ๊ฐ“ ์˜คํ”ˆํ•œ ๋ชจ๋ฐ”์ผ ์„œ๋น„์Šค๋ฅผ ์šด์˜ํ•ด์˜จ์ง€ ์–ด๋Š๋ง 1๋…„์ด ์ง€๋‚ฌ์ง€๋งŒ ์›น ๋ทฐ(Web View) ํ˜•ํƒœ์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ธํ•˜์šฐ์Šค ๋ฐฐํฌํ•˜๊ณ  ์žˆ๋‹ค๋ณด๋‹ˆ ๋ณ„๋„๋กœ ๋ฒ„์ „ ๊ด€๋ฆฌ ๊ทœ์น™์„ ์„ธ์›Œ๋‘์ง€ ์•Š์€์ฑ„ ์˜คํ”ˆ์„ ํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๋‹คํ•  ๊ทœ์น™์ด ์—†์–ด์„œ ๋นŒ๋“œํ•˜๋Š” ๋Œ€๋กœ.. ์ˆ˜์ •์ด ํ•„์š”ํ•œ๋Œ€๋กœ.. ์•ˆ๋“œ๋กœ์ด๋“œ/iOS ์„ค์น˜ ํŒŒ์ผ์„ ์›น ์„œ๋ฒ„์— ์˜ฌ๋ ค๋‘๊ธฐ๋งŒ ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ˆ˜์ •์ด ์žฆ์•„์ง€๋ฉด์„œ ํŠน๋ณ„ํ•œ ๊ทœ์น™์ด ์—†๊ณ  ์–ด๋–ค ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ–ˆ๋Š”์ง€์— ๋Œ€ํ•œ ๊ธฐ๋ก์ด ์—†์–ด ์ ์  ๊ด€๋ฆฌ๊ฐ€ ์–ด๋ ค์›Œ์ ธ์„œ ์ œ๊ฐ€ ์ง์ ‘ ํƒ๊ตฌํ•˜๊ณ  ์ฐพ์•„๊ฐ€๋ฉฐ ๊ทœ์น™์„ ์„ธ์›Œ๋ณด๋ฉด์„œ ๋„์›€์ด ๋œ ์ž๋ฃŒ๋‚˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๋ฒ„์ „ (version) ๋ฒ„์ „์ด ์กด์žฌํ•ด์•ผ ํ•˜๋Š” ์ด์œ ๋Š” ๋ฌด์—‡์ผ๊นŒ์š”? ์œ„ ์‚ฌ์ง„์ฒ˜๋Ÿผ ์ตœ์ข…์ผ ๊ฒƒ๋งŒ ๊ฐ™์€ ๋‚ด ์ž‘ํ’ˆ์ด ๋˜ ์ˆ˜์ •๋˜๋ฉด ๊ทธ๊ฒƒ ๋˜ํ•œ ์ตœ์ข…... ์ด ์„œ์‚ฌ๋ฅผ ๋ฐ˜๋ณตํ•˜๋Š” ์ด์œ ๋Š” ํžˆ์Šคํ† ๋ฆฌ ..

๋ฐ˜์‘ํ˜•