728x90

๐Ÿ“˜ Programming/โŒ ERR 4

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. ์Œ๋”ฐ..

๋ฐ˜์‘ํ˜•