๋ฐ˜์‘ํ˜•

Springboot study 2

[SpringBoot] Failed to instantiate Factory method 'someHotMongoFactory' threw exception with message: Cannot invoke "String.startsWith(String)" because "connectionString" is null

Intro mongodb ์—์„œ ์ถ”๊ฐ€๋œ ์ปฌ๋ ‰์…˜์„ ์Šคํ”„๋ง๋ถ€ํŠธ์—์„œ ํ™œ์šฉํ•˜๋˜ ๋„์ค‘ ์•„๋ž˜์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. Failed to instantiate [org.springframework.data.mongodb.core.SimpleReactiveMongoDatabaseFactory]: Factory method 'someHotMongoFactory' threw exception with message: Cannot invoke "String.startsWith(String)" because "connectionString" is null Why? ์ด ์˜ค๋ฅ˜๋Š” connectionString์ด null์ด๊ธฐ ๋•Œ๋ฌธ์— "String.startsWith(String)"๋ฅผ ํ˜ธ์ถœํ•  ์ˆ˜ ์—†๋‹ค๋Š” ๊ฒƒ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. SomeHotMo..

[Springboot] JPA Projection ํ”„๋กœ์ ์…˜ ํ•˜๋Š” ๋ฐฉ๋ฒ•

Intro ์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” Springboot ์Šคํ”„๋ง๋ถ€ํŠธ JPA์—์„œ ํ”„๋กœ์ ์…˜ ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Projection? ๋จผ์ € ๋“ค์–ด๊ฐ€๊ธฐ์— ์•ž์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ”„๋กœ์ ์…˜์— ๋Œ€ํ•œ ์˜๋ฏธ๋ฅผ ์‚ดํŽด๋ณผ๊ฒŒ์š”. ํ”„๋กœ์ ์…˜์€ ์—”ํ‹ฐํ‹ฐ์˜ ์†์„ฑ์ด ๋งŽ์„ ๋•Œ ์ผ๋ถ€ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๋” ์ž์„ธํ•œ ๋‚ด์šฉ์ด ๊ถ๊ธˆํ•˜์‹œ๋ฉด ์ผ์ „์— ์ œ๊ฐ€ ์ •๋ฆฌํ•ด๋†“์€ ํฌ์ŠคํŒ… ์ฐธ๊ณ  ๋ฐ”๋ž๋‹ˆ๋‹ค :) [MongoDB] ํ”„๋กœ์ ์…˜ (Projection) ์ด๋ž€? projection query ์‚ฌ์šฉ๋ฒ• How to do ์•„๋ž˜์˜ User domain ๊ฐ์ฒด๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์„ค๋ช…ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. @Document(collection = "user") class User( val userId: String?, val userName: String?, val user..

๋ฐ˜์‘ํ˜•