user-img
๊ฒช์€ ์˜ค๋ฅ˜์™€ ํ•ด๊ฒฐ์ฑ… 3
thumbnail
[์•Œ๊ณ ๋ฆฌ์ฆ˜] LeetCode์—์„œ ์ „์—ญ ๋ณ€์ˆ˜ (static) ์“ธ ๋•Œ ์ดˆ๊ธฐํ™” ๊ผญ ํ•ด์ค˜์•ผ ํ•ด์š”!
1. ๊ฒช์—ˆ๋˜ ๋ฌธ์ œLeetCode ๋ฌธ์ œ๋ฅผ ํ’€๋ฉฐ, ๋กœ์ง์ด ๋งž๋Š” ๊ฒƒ ๊ฐ™์€๋ฐ๋„, ์ œ์ถœ ์‹œ ๊ณ„์† ๋‹ต์ด ํ‹€๋ฆฌ๊ฒŒ ๋‚˜์™€์„œ, Debuging์„ ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค.์ œ๊ฐ€ ํ’€์—ˆ๋˜ ๋ฌธ์ œ๋Š” ์ด๊ฒƒ์ž…๋‹ˆ๋‹ค.๋ฌธ์ œ๋ฅผ ์•ˆ ํ‘ธ์…”๋„ ์•Œ ์ˆ˜ ์žˆ๊ฒŒ ๊ฐ„๋‹จํžˆ ๋ง์”€๋“œ๋ฆฌ๋ฉด,target์— ์žˆ๋Š” ๊ฐ’์„ key = target[i], value = i ๋กœ ํ•ด์„œ map์— ์ง‘์–ด๋„ฃ์œผ๋ ค๊ณ  ํ–ˆ์Šต๋‹ˆ๋‹ค. target์˜ ๊ฐ’์€ ๋‹ค์Œ๊ณผ ๊ฐ™์•˜์Šต๋‹ˆ๋‹ค.target = [5,10,8,11,3,15,9,20,18,13]๊ทผ๋ฐ System.out.println()์œผ๋กœ ์ฐ์–ด๋ณด๋‹ˆ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‚˜์™”์Šต๋‹ˆ๋‹ค!{1=3, 2=5, 3=4, 4=1, 5=0, 6=0, 8=2, 9=6, 10=1, 11=3, 13=9, 15=5, 18=8, 20=7}target์— ์—†๋Š” 1์ด๋‚˜ 2 ๊ฐ™์€ ๊ฐ’์ด ๋“ค์–ด์žˆ๋˜ ๊ฒƒ์ž…๋‹ˆ๋‹ค. m..
2024.08.20
๊ฒช์€ ์˜ค๋ฅ˜์™€ ํ•ด๊ฒฐ์ฑ…
(JWT binding ์˜ค๋ฅ˜) NoClassDefFoundError: javax/xml/bind/DatatypeConverter
implementation 'io.jsonwebtoken:jjwt:0.9.1' ์ด๊ฒƒ๋งŒ ์žˆ์œผ๋ฉด ์•ˆ๋œ๋‹ค. ์ด๊ฑฐ ์ด์™ธ์— // com.sun.xml.bind implementation 'com.sun.xml.bind:jaxb-impl:4.0.1' implementation 'com.sun.xml.bind:jaxb-core:4.0.1' // javax.xml.bind implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359' ์ถ”๊ฐ€ ํ•ด์•ผํ•จ.
2024.01.22
๊ฒช์€ ์˜ค๋ฅ˜์™€ ํ•ด๊ฒฐ์ฑ…
SpringBoot3 Embedded Redis ์„ค์ • ์˜ค๋ฅ˜
๋‚˜๋Š” ์ฑ„ํŒ… ์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ๋ฅผ ์—ฐ์Šตํ•˜๋ฉฐ ๋Œ€๋””ํ”„๋กœ๊ทธ๋ž˜๋จธ ์ฑ„ํŒ…์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ(3) Spring websocket chatting server(3) - ์—ฌ๋Ÿฌ๋Œ€์˜ ์ฑ„ํŒ…์„œ๋ฒ„๊ฐ„์— ๋ฉ”์‹œ์ง€ ๊ณต์œ ํ•˜๊ธฐ by Redis pub/sub ์•ž ์žฅ์—์„œ ์‹ค์Šต์„ ํ†ตํ•ด ์ฑ„ํŒ…์„ ๊ตฌํ˜„ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค. websocket๊ณผ Stomp๋ฅผ ์ด์šฉํ•œ ๊ตฌํ˜„๋งŒ์œผ๋กœ๋„ ์ฑ„ํŒ…์˜ ๊ธฐ๋ณธ ๊ธฐ๋Šฅ์€ ์ถฉ๋ถ„ํžˆ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์„œ๋น„์Šค์— ์‚ฌ์šฉํ•˜๋ ค๋ฉด www.daddyprogrammer.org ๋ฅผ ์ฐธ๊ณ ํ•˜์˜€๋Š”๋ฐ, ํ•ด๋‹น ๋ถ€๋ถ„์„ ์ง„ํ–‰ํ•˜๋ฉฐ ์•ˆ๋˜๋Š” ๋ถ€๋ถ„์ด ์ƒ๊ฒผ๋‹ค. ๋ฐ”๋กœ Embedded Redis๋ฅผ ์„ค์ •ํ•˜๋Š” Config Class ๋ถ€๋ถ„์ด์—ˆ๋‹ค. ํ•ด๋‹น ๋‚ด์šฉ์—์„œ๋Š” public void redisServer() { redisServer = new RedisServer(r..
2024.01.20
๊ฒช์€ ์˜ค๋ฅ˜์™€ ํ•ด๊ฒฐ์ฑ