[Spring/Security] Firebase๋ฅผ ํ™œ์šฉํ•œ ์ธ์ฆ ๊ตฌํ˜„
ยท
Backend/Spring Boot
ํ”„๋กœ์ ํŠธ์˜ ์ด์ „ ๋ฒ„์ „์—๋Š” ๋”ฐ๋กœ ๋ฐฑ์—”๋“œ ์„œ๋ฒ„๊ฐ€ ์—†์—ˆ๊ณ , React Native์—์„œ Firebase๋ฅผ ์ด์šฉํ•ด ์†Œ์…œ ๋กœ๊ทธ์ธ์„ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ์—ˆ๋‹ค. ๋‚˜๋Š” ์ดํ›„ ํ”„๋กœ์ ํŠธ์— ํ•ฉ๋ฅ˜ํ•ด Spring์œผ๋กœ ๋‹ค๋ฅธ ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœํ•˜๊ณ  ์žˆ๋‹ค. ๋ฐฑ์—”๋“œ์—์„œ๋„ ์‚ฌ์šฉ์ž๋ฅผ ์‹๋ณ„ํ•˜๊ธฐ ์œ„ํ•ด Firebase๋กœ ๋ฐœ๊ธ‰๋œ ํ† ํฐ์„ ์‚ฌ์šฉํ•ด์•ผ ํ–ˆ๋‹ค.  ๊ตฌํ˜„์„ ์œ„ํ•ด Firebase Token์— ๋Œ€ํ•ด ์ดํ•ดํ•˜๋Š” ๊ณผ์ •์ด ํ•„์š”ํ–ˆ๊ณ , ํ† ํฐ์„ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•ด Spring Security๋„ ๊ณต๋ถ€ํ•ด์•ผ ๋๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ตœ์ข…์ ์œผ๋กœ firebase๊ฐ€ ํฌํ•จ๋œ ์„œ๋ฒ„๋ฅผ ๋ฐฐํฌํ•˜๊ธฐ๊นŒ์ง€ ๋งŽ์€ ์‚ฝ์งˆ์„ ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ๊ตฌํ˜„ํ•˜๋ฉด์„œ ๊ณต๋ถ€ํ–ˆ๋˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๊ณ , ๊ตฌํ˜„ ๊ณผ์ •์„ ๊ณต์œ ํ•˜๊ณ ์ž ํ•œ๋‹ค!     Firebase Token? ์šฐ์„  Firebase Token์— ๋Œ€ํ•ด ์•Œ์•„์•ผ ํ•œ๋‹ค. Firebase Authe..
[Spring] DTO ํด๋ž˜์Šค ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ ์—๋Ÿฌ : com.fasterxml.jackson.databind.exc.InvalidDefinitionException : No serializer found for class
ยท
Backend/Spring Boot
๐Ÿ’ป ์—๋Ÿฌ ๋ฉ”์‹œ์ง€com.fasterxml.jackson.databind.exc.InvalidDefinitionException : No serializer found for class com.xxxxxxx.xxxxx.dto.user.ProfileDto and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.xxxxxxx.xxxxx.api.response.xxxxxxxxxx["ProfileDto"])     ๐Ÿ”Ž ์›์ธ Jackson์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ”์ธ๋”ฉํ•˜๋Š” ๊ณผ์ •์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค.  Jack..
[Spring Boot] Spring Boot์— Swagger ์ถ”๊ฐ€ํ•˜๊ธฐ
ยท
Backend/Spring Boot
Swagger๋Š” ๊ฐœ๋ฐœ์ž๊ฐ€ ์ž๋™์œผ๋กœ REST API๋ฅผ ๋ฌธ์„œํ™”ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” ์˜คํ”ˆ์†Œ์Šค ํ”„๋ ˆ์ž„์›Œํฌ์ด๋‹ค.  ๋ฐฑ์—”๋“œ์—์„œ ๊ฐœ๋ฐœํ•œ ์„œ๋ฒ„ API๋ฅผ ํ”„๋ก ํŠธ์—”๋“œ์—์„œ ์—ฐ๊ฒฐํ•ด์•ผ ํ•˜๋Š”๋ฐ, ๋ฌธ์„œํ™”๋ฅผ ํ•ด๋‘๋ฉด API๋ฅผ ์‰ฝ๊ฒŒ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ์–ด ํ˜‘์—…ํ•˜๋Š” ๋ฐ ์ข‹๋‹ค. ๊ทธ๋ฆฌ๊ณ  Swagger ๊ฐ™์€ ๊ฒฝ์šฐ์—๋Š” ๊ฐ„๋‹จํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ํ•  ์ˆ˜ ์žˆ๋Š” UI๋„ ์ œ๊ณตํ•˜์—ฌ API ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๊ธฐ์—๋„ ์ข‹๋‹ค.      ๊ทธ๋™์•ˆ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉฐ, ์„œ๋ฒ„ API๋ฅผ ๋ฌธ์„œํ™”๋ฅผ ์œ„ํ•ด Swagger๋ฅผ ์‚ฌ์šฉํ–ˆ์—ˆ๋‹ค. ์ž‘๋…„์— Spring Boot 2.X ๋ฒ„์ „์—์„œ ๊ฐœ๋ฐœํ•˜๋ฉฐ Springfox๋ฅผ ์ ์šฉํ•ด Swagger๋ฅผ ์ถ”๊ฐ€ํ–ˆ์—ˆ๋Š”๋ฐ, ์ด๋ฒˆ์— Spring 3.X ๋ฒ„์ „์—์„œ ๊ฐœ๋ฐœํ•˜๋ฉฐ Springfox๊ฐ€ ์ ์šฉ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค.  Springdoc์„ ์ ์šฉํ•˜๋ฉด ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค๋Š”๋ฐ, ๋‘ ๋ผ์ด๋ธŒ..
[Spring Boot] Spring Boot 3๊ณผ Spring Boot 2 ๋น„๊ต
ยท
Backend/Spring Boot
์ด๋ฒˆ์— ํ”„๋กœ์ ํŠธ์— ์ƒˆ๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜๋ฉด์„œ, Spring Boot ๋ฒ„์ „์„ ์„ ํƒํ•ด์•ผ ๋๋‹ค. ์ž‘๋…„(23๋…„ ์ดˆ)๊นŒ์ง€๋งŒ ํ•ด๋„ ๊ต์œก์—์„œ ์šฐ๋ฆฌ ํŒ€ ๋ฟ๋งŒ์•„๋‹ˆ๋ผ, ๊ฑฐ์˜ ๋ชจ๋“  ์ฃผ๋ณ€ ํŒ€๋“ค์ด Spring 2.7 ๋ฒ„์ „์„ ์‚ฌ์šฉํ–ˆ์—ˆ๋‹ค. ์•„๋ฌด๋ž˜๋„ Spring Boot 3 (22๋…„ 11์›” ์ถœ์‹œ)์ด ๋‚˜์˜จ์ง€ ์–ผ๋งˆ ์•ˆ๋˜์–ด์„œ Deprecated ๋˜๋Š” ๊ฒƒ๋„ ๊ฝค ์žˆ์—ˆ๊ณ , ์ฐธ๊ณ  ์ž๋ฃŒ๊ฐ€ ์ƒ๋Œ€์ ์œผ๋กœ ์ ์–ด ๋‹ค๋“ค 2.7 ๋ฒ„์ „์„ ์„ ํƒํ–ˆ์—ˆ๋‹ค.         Spring Boot 2๊ฐ€ ๋‚ฎ์€ ๋ฒ„์ „๋ถ€ํ„ฐ ์ง€์›์ด ์ ์  ๋Š๊ธฐ๊ณ  ์žˆ๋‹ค. ๊ทธ๋ž˜์„œ ๊ธฐ์กด์˜ ํ”„๋กœ์ ํŠธ๋ฅผ Spring Boot 3์œผ๋กœ ์ ์ฐจ ๋งˆ์ด๊ทธ๋ž˜์ด์…˜ ํ•˜๊ณ  ์žˆ๋‹ค๊ณ  ๋“ค์—ˆ๋‹ค.   ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์— Spring Boot 3 ๋ฒ„์ „์„ ์“ฐ๊ฒŒ ๋˜์–ด์„œ, Spring Boot 3์—์„œ ์–ด๋–ป๊ฒŒ ๋‹ฌ๋ผ์กŒ๋Š”์ง€ ์•Œ์•„๋ณด๊ณ ์ž ํ•œ๋‹ค!     Java..
giraffe_
'์Šคํ”„๋ง๋ถ€ํŠธ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก