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

๐Ÿ”ฅ ํ”„๋กœ์ ํŠธ/์›จ๋”ฉ๋ฉ”์ดํŠธ14

[์ง€์‹] yml ํ™˜๊ฒฝ๋ณ€์ˆ˜ env์— ๋“ฑ๋กํ•˜๊ธฐ ์ง€๊ธˆ๊นŒ์ง€ ๋งจ๋‚  commitํ•  ๋•Œ๋งˆ๋‹ค ๋กœ์ปฌ์—์„œ yml ๋ณต์‚ฌํ•˜๊ณ  ์ง€์šฐ๊ณ  commit ํ›„ ๋‹ค์‹œ ๋ถ™์—ฌ๋„ฃ๊ธฐํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ํŒ€์›์ด ์ข‹์€ ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค์ค˜์„œ ์‹คํ–‰ํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค! ๋ฐ”๋กœ env ํŒŒ์ผ์— yml์˜ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๊ฐ’์„ ๋“ฑ๋กํ•ด๋†“๋Š” ๋ฒ•์ด๋‹ค. ๋กœ์ปฌ resource/properties/env.properties ์ƒ์„ฑ ํ›„ ์•„๋ž˜ ๊ตฌ์กฐ๋กœ ์„ค์ •ํŒŒ์ผ ์ˆ˜์ • propertyConfig ํŒŒ์ผ ์ƒ์„ฑ package swmaestro.spaceodyssey.weddingmate.global.config; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.spr.. 2023. 8. 13.
[์„ค๊ณ„] Tag ํ…Œ์ด๋ธ” ๋ฆฌํŒฉํ† ๋ง ๋ฐ Tag ๊ฒ€์ƒ‰ ๋ฐฉ์•ˆ ํ˜„์žฌ ์ƒํ™ฉ ์˜ˆ๋น„๋ถ€๋ถ€, ํ”Œ๋ž˜๋„ˆ, ํฌํŠธํด๋ฆฌ์˜ค, ์•„์ดํ…œ์—์„œ ํƒœ๊ทธ๋ฅผ ์ฐธ์กฐํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ N:M ๊ด€๊ณ„์ด๊ธฐ ๋•Œ๋ฌธ์— ํ˜„์žฌ๋Š” ์ค‘๊ฐ„ํ…Œ์ด๋ธ”์„ ๋‘์–ด ํƒœ๊ทธ ํ…Œ์ด๋ธ”๊ณผ ์—ฐ๊ฒฐํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์œ ์ €๋Š” ์ฃผ์–ด์ง„ ํƒœ๊ทธ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์ž์‹ ์ด ์ง์ ‘ ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๊ณ , ์ถ”๊ฐ€ํ•œ ํƒœ๊ทธ๋กœ๋„ ๊ฒ€์ƒ‰์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋ฌธ์ œ์  ํ˜„์žฌ MVP ๊ธฐ๋Šฅ ERD๋งŒ ๊ทธ๋ ธ๋Š”๋ฐ๋„ ํ…Œ์ด๋ธ”์ด ๋งŽ์•„์ง€๊ณ , ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋จ์— ๋”ฐ๋ผ ์ค‘๊ฐ„ ํ…Œ์ด๋ธ”๋„ ๋งŽ์•„์ ธ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๊ฐ€ ๋ณต์žกํ•ด์งˆ ์ˆ˜ ์žˆ๋‹ค๋Š” ๋‹จ์ ์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. ํ•ด๊ฒฐ ๋ฐฉ์•ˆ 1. ์ค‘๊ฐ„ ํ…Œ์ด๋ธ”์„ ํ•˜๋‚˜๋กœ ํ†ตํ•ฉํ•˜๊ณ , boolean ๊ฐ’์„ ํ†ตํ•ด ํƒœ๊ทธ ์ค‘๊ฐ„ ํ…Œ์ด๋ธ”์„ ๊ด€๋ฆฌ - table_id (long) - is_customer (bool) - is_planner (bool) - is_porfolio (bool) - is_item (bo.. 2023. 8. 13.
[์˜ค๋ฅ˜] @AuthUser์—์„œ User ๊ฐ์ฒด๋ฅผ ๋ฐ›์•„์˜ค์ง€ ๋ชปํ•˜๋Š” ์˜ค๋ฅ˜ ๋ฌธ์ œ ์ƒํ™ฉ UserPrincipal์„ ์ƒ์†๋ฐ›์€ @authUser ์‚ฌ์šฉ ์‹œ ์•„๋ž˜ ์—๋Ÿฌ ๋ฐœ์ƒ EL1008E: Property or field 'users' cannot be found on object of type 'swmaestro.spaceodyssey.weddingmate.domain.oauth2.UserPrincipal' - maybe not public or not valid?" ๋ฐœ์ƒ ์›์ธ UserPrincipal์•ˆ์— User๊ฐ€ ์—†์–ด์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ ํ˜„์žฌ ํ”„๋กœ์ ํŠธ์—์„œ๋Š” UserPrincipal์—์„œ UserDetails๋ฅผ ๋ฐ›์•„์„œ ๊ตฌํ˜„ํ•œ ์ƒํƒœ์ž„ UserDetailsService์—์„œ Returnํ•˜๋Š” ๊ฐ์ฒด๋Š” UserDetails ํƒ€์ž…์ด์—ฌ์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ์ด๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” User ํด๋ž˜์Šค๋ฅผ ์ƒ์† ๋ฐ›๋Š” ๋ฐฉ์‹์œผ๋กœ.. 2023. 8. 13.
[์˜ค๋ฅ˜] ์ฟ ํ‚ค ํ•˜์œ„ ๋„๋ฉ”์ธ์ด ๋‹ฌ๋ผ ์ „๋‹ฌ๋˜์ง€ ์•Š๋Š” ์˜ค๋ฅ˜ ๋ฌธ์ œ ์ƒํ™ฉ ํ•˜์œ„ ๋„๋ฉ”์ธ(api.weddingmate.co.kr)์—์„œ ์ƒ์œ„ ๋„๋ฉ”์ธ(weddingmate.co.kr)์œผ๋กœ ์ฟ ํ‚ค๋ฅผ ๋ณด๋‚ด์•ผ ํ•˜๋Š” ์ƒํ™ฉ ResponseCookie.from("refreshToken", refreshToken) .path("/") .domain("weddingmate.co.kr") .maxAge(TimeUnit.MILLISECONDS.toSeconds(refreshTokenValidationTime)) .secure(true) .sameSite("None") .httpOnly(true) .build(); ๋ฐœ์ƒ ์›์ธ Redis์— ์ €์žฅ๋œ refreshToken ๊ฐ’(1)๊ณผ ์ฟ ํ‚ค์— ๋‹ด์•„์„œ ์ „๋‹ฌ๋˜๋Š” refreshToken ๊ฐ’(2)์ด ๋‹ค๋ฆ„ ์ฟ ํ‚ค ์ „๋‹ฌ ๊ณผ์ •์—์„œ ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ๊ฒƒ์œผ๋กœ ํŒŒ์•… publi.. 2023. 8. 13.