๋ฐ˜์‘ํ˜•

Springboot ์˜ค๋ฅ˜ 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] Http Status 415 error ์˜ค๋ฅ˜ (415 Unsupported Media Type)

Intro ์•ˆ๋…•ํ•˜์„ธ์š”. Springboot ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ Http Status 415 error ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. 415 Unsupported Media Type Why? ๊ธฐ์กด ์ปจํŠธ๋กค๋Ÿฌ์—์„œ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ๋ฐ›๊ธฐ ์œ„ํ•ด @RequestParam ์–ด๋…ธํ…Œ์ด์…˜์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๋งค๊ฐœ๋ณ€์ˆ˜ 5๊ฐœ๋ฅผ ๋ฐ›๊ณ  ์žˆ๋˜ ํ„ฐ๋ผ ์ƒ๋‹นํžˆ ๋ณต์žกํ•ด ๋ณด์—ฌ ํ•ด๋‹น ๋งค๊ฐœ๋ณ€์ˆ˜๋“ค์„ ํ•˜๋‚˜์˜ Dto Req ๊ฐ์ฒด๋กœ ๋ฐ”๊ฟ”์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ์ดํ›„ ์ฝ”๋“œ ์‹คํ–‰์„ ํ–ˆ๋Š”๋ฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. Springboot ๋ฅผ ์ž˜ ๋ชฐ๋ผ์„œ, ํ•ด๋งธ์ง€๋งŒ ์ €ํฌ์—๊ฒ ๊ตฌ๊ธ€๋‹˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿคง !! ๊ตฌ๊ธ€๋ง ํ›„, ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ ์–ด๋…ธํ…Œ์ด์…˜์ด ์ž˜๋ชป ๋˜์—ˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. @RequestParam ๋Š” ๋‹จ์ผ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›๊ธฐ ์œ„ํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์—ฌ๋Ÿฌ ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ๋“ค์–ด..

๋ฐ˜์‘ํ˜•