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

์ „์ฒด ๊ธ€115

[๋ธŒ๋ฃจํŠธํฌ์Šค][๋ฐฑ์ค€]1018-์ฒด์ŠคํŒ ๋‹ค์‹œ ์น ํ•˜๊ธฐ ์ฒด์ŠคํŒ ๋‹ค์‹œ ์น ํ•˜๊ธฐ ์‹œ๊ฐ„ ์ œํ•œ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ์ œ์ถœ์ •๋‹ต๋งžํžŒ ์‚ฌ๋žŒ์ •๋‹ต ๋น„์œจ 2 ์ดˆ 128 MB 103387 51258 41039 49.647% ๋ฌธ์ œ ์ง€๋ฏผ์ด๋Š” ์ž์‹ ์˜ ์ €ํƒ์—์„œ MN๊ฐœ์˜ ๋‹จ์œ„ ์ •์‚ฌ๊ฐํ˜•์œผ๋กœ ๋‚˜๋ˆ„์–ด์ ธ ์žˆ๋Š” M×N ํฌ๊ธฐ์˜ ๋ณด๋“œ๋ฅผ ์ฐพ์•˜๋‹ค. ์–ด๋–ค ์ •์‚ฌ๊ฐํ˜•์€ ๊ฒ€์€์ƒ‰์œผ๋กœ ์น ํ•ด์ ธ ์žˆ๊ณ , ๋‚˜๋จธ์ง€๋Š” ํฐ์ƒ‰์œผ๋กœ ์น ํ•ด์ ธ ์žˆ๋‹ค. ์ง€๋ฏผ์ด๋Š” ์ด ๋ณด๋“œ๋ฅผ ์ž˜๋ผ์„œ 8×8 ํฌ๊ธฐ์˜ ์ฒด์ŠคํŒ์œผ๋กœ ๋งŒ๋“ค๋ ค๊ณ  ํ•œ๋‹ค. ์ฒด์ŠคํŒ์€ ๊ฒ€์€์ƒ‰๊ณผ ํฐ์ƒ‰์ด ๋ฒˆ๊ฐˆ์•„์„œ ์น ํ•ด์ ธ ์žˆ์–ด์•ผ ํ•œ๋‹ค. ๊ตฌ์ฒด์ ์œผ๋กœ, ๊ฐ ์นธ์ด ๊ฒ€์€์ƒ‰๊ณผ ํฐ์ƒ‰ ์ค‘ ํ•˜๋‚˜๋กœ ์ƒ‰์น ๋˜์–ด ์žˆ๊ณ , ๋ณ€์„ ๊ณต์œ ํ•˜๋Š” ๋‘ ๊ฐœ์˜ ์‚ฌ๊ฐํ˜•์€ ๋‹ค๋ฅธ ์ƒ‰์œผ๋กœ ์น ํ•ด์ ธ ์žˆ์–ด์•ผ ํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ์ด ์ •์˜๋ฅผ ๋”ฐ๋ฅด๋ฉด ์ฒด์ŠคํŒ์„ ์ƒ‰์น ํ•˜๋Š” ๊ฒฝ์šฐ๋Š” ๋‘ ๊ฐ€์ง€๋ฟ์ด๋‹ค. ํ•˜๋‚˜๋Š” ๋งจ ์™ผ์ชฝ ์œ„ ์นธ์ด ํฐ์ƒ‰์ธ ๊ฒฝ์šฐ, ํ•˜๋‚˜๋Š” ๊ฒ€์€์ƒ‰์ธ ๊ฒฝ์šฐ์ด๋‹ค. ๋ณด๋“œ๊ฐ€ ์ฒด์ŠคํŒ์ฒ˜๋Ÿผ .. 2023. 9. 10.
[ํ•ด์ปคํ†ค][ํ˜ธ๋‚จ์˜ ์–ผ๊ตด]์–ผ๊ตด์ธ์‹ ์ถœ์„ ์„œ๋น„์Šค ๋ณธ ํ”„๋กœ์ ํŠธ๋Š” ์˜คํ”ˆ ์†Œ์Šค๋กœ ๊ณต๊ฐœํ•ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค๐Ÿคญ ๐Ÿ‘‡๐Ÿป ํด๋ฆญํ•ด์ฃผ์„ธ์šฉ ๐Ÿ‘‡๐Ÿป ๊นƒํ—ˆ๋ธŒ ์ฃผ์†Œ 2023. 9. 4.
[Spring] ์š”์ฒญ ๋งคํ•‘ ํ•ธ๋“ค๋Ÿฌ ์–ด๋Žํ„ฐ์˜ ๊ตฌ์กฐ Argument Resolver ์• ๋…ธํ…Œ์ด์…˜ ๊ธฐ๋ฐ˜ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” RequestMappingHandlerAdapter๋Š” ๋ฐ”๋กœ ์ด ArgumentResolver๋ฅผ ํ˜ธ์ถœํ•ด์„œ ์ปจํŠธ๋กค๋Ÿฌ(ํ•ธ๋“ค๋Ÿฌ)๊ฐ€ ํ•„์š”๋กœ ํ•˜๋Š” ๋‹ค์–‘ํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ๊ฐ’(๊ฐ์ฒด)๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด๋ ‡๊ฒŒ ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ๊ฐ’์ด ๋ชจ๋‘ ์ค€๋น„๋˜๋ฉด ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ํ˜ธ์ถœํ•˜๋ฉด์„œ ๊ฐ’์„ ๋„˜๊ฒจ์ค€๋‹ค. public interface HandlerMethodArgumentResolver { boolean supportsParameter(MethodParameter parameter); @Nullable Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, Native.. 2023. 8. 8.
[Spring] ์Šคํ”„๋ง MVC ๊ธฐ๋ณธ ๊ธฐ๋Šฅ @RestController @Controller ๋Š” ๋ฐ˜ํ™˜ ๊ฐ’์ด String ์ด๋ฉด ๋ทฐ ์ด๋ฆ„์œผ๋กœ ์ธ์‹๋œ๋‹ค. ๊ทธ๋ž˜์„œ ๋ทฐ๋ฅผ ์ฐพ๊ณ  ๋ทฐ๊ฐ€ ๋žœ๋”๋ง ๋œ๋‹ค. @RestController ๋Š” ๋ฐ˜ํ™˜ ๊ฐ’์œผ๋กœ ๋ทฐ๋ฅผ ์ฐพ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, HTTP ๋ฉ”์‹œ์ง€ ๋ฐ”๋””์— ๋ฐ”๋กœ ์ž…๋ ฅํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ์‹คํ–‰ ๊ฒฐ๊ณผ๋กœ ok ๋ฉ”์„ธ์ง€๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค. @RequestMapping์— method ์†์„ฑ์œผ๋กœ HTTP ๋ฉ”์„œ๋“œ๋ฅผ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด HTTP ๋ฉ”์„œ๋“œ์™€๋Š” ๋ฌด๊ด€ํ•˜๊ฒŒ ํ˜ธ์ถœ๋œ๋‹ค. /** * method ํŠน์ • HTTP ๋ฉ”์„œ๋“œ ์š”์ฒญ๋งŒ ํ—ˆ์šฉ * GET, HEAD, POST, PUT, PATCH, DELETE */ @RequestMapping(value = "/mapping-get-v1", method = RequestMethod.GET) public String m.. 2023. 8. 7.