๋ฐ˜์‘ํ˜•

Framework 86

[Springboot] The dependencies of some of the beans in the application context form a cycle ์˜ค๋ฅ˜ / ์ƒ์„ฑ์ž ์ฃผ์ž… ์‹œ ์ˆœํ™˜ ์ฐธ์กฐ ๋ฐœ์ƒ

Intro spring boot์—์„œ service๋ฅผ ์ฃผ์ž…ํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ ๋‹ค์Œ์˜ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. The dependencies of some of the beans in the application context form a cycle ์ธํ…”๋ฆฌ์ œ์ด ํ„ฐ๋ฏธ๋„์— ์ˆœํ™˜ ์ฐธ์กฐ๋˜๊ณ  ์žˆ๋‹ค๋Š” ํ‘œ์‹œ์™€ ํ•จ๊ป˜ ์ž˜ ์˜ฌ๋ผ๊ฐ€๋˜ ์„œ๋ฒ„๊ฐ€ ๋™์ž‘ํ•˜์ง€ ์•Š์•˜๋”๊ตฐ์š”.. Why? ์ฒ˜์Œ ๋ณด๋Š” ์˜ค๋ฅ˜๋ผ์„œ ์ด๊ฒŒ ๋ญ˜๊นŒ ์‹ถ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ณด๋‹ˆ ๋‘ ํŒŒ์ผ์—์„œ ์„œ๋กœ ๋™์ผํ•˜๊ฒŒ ์ƒ์„ฑ์ž๋ฅผ ์ฃผ์ž…ํ•ด ์‚ฌ์šฉํ•ด์„œ ์ˆœํ™˜ ์ฐธ์กฐ๊ฐ€ ์ผ์–ด๋‚˜๊ณ , ๋•Œ๋ฌธ์— ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋˜ ๊ฒƒ์ด์˜€์Šต๋‹ˆ๋‹ค. How to solve the problem ๊ตฌ๊ธ€๋งํ•œ ๊ฒฐ๊ณผ, ์ˆœํ™˜ ์ฐธ์กฐ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•  ๋ฐฉ๋ฒ•์€ ํฌ๊ฒŒ 3๊ฐ€์ง€๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. #1 application.yml ๋ณ€๊ฒฝ spring: applicati..

[Next.js & React] ํ”„๋กœ์ ํŠธ ์‹œ๊ฐ„ ํŽ˜์ด์ง€ ์‚ฌ์ „ ๋ Œ๋”๋ง & ๋ฐ์ดํ„ฐ ํŽ˜์นญ

์ด ๊ธ€์€ udemy์˜ Next.js & React - ์™„๋ฒฝ ์ •๋ณต ๊ฐ€์ด๋“œ (incl. Two Paths) ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 124. ๋ชจ๋“ˆ ์š”์•ฝ getStaticProps ํ•จ์ˆ˜๋„ ์‹คํ–‰ํ•ด๋ณด๊ณ  ์œ ํšจ์„ฑ ์žฌ๊ฒ€์‚ฌ ์˜ต์…˜์„ ํ†ตํ•ด ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ๊ฐ€ ๋ฐฐ์น˜๋˜๊ณ  ์ฃผ๊ธฐ์ ์œผ๋กœ ์žฌ์ƒ์„ฑํ•˜๊ฒŒ ์„ค์ •ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ getStaticPaths ํ•จ์ˆ˜๋ฅผ ๊ฒฐํ•ฉํ•˜์—ฌ ๋™์  ํŽ˜์ด์ง€๋ฅผ ์ƒ์„ฑํ–ˆ๊ณ  ํด๋ฐฑ ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•จ์œผ๋กœ์จ ์˜ˆ์ƒ๋˜๋Š” ๋ชจ๋“  ๊ฒฝ์šฐ์˜ ์ธ์Šคํ„ด์Šค์— ์•Œ์•„์„œ ๋Œ€์‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ–ˆ์Šต๋‹ˆ๋‹ค. getServerSideProps ํ•จ์ˆ˜๋„ ์‹คํ–‰ํ•˜๋Š” ๊ฑธ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ํด๋ผ์ด์–ธํŠธ ์‚ฌ์ด๋“œ ๋ฐ์ดํ„ฐ ํŽ˜์นญ์œผ๋กœ ์ „ํ™˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ํ•จ์ˆ˜๋Š” ๋‹ค์Œ์— ์‹ค์Šตํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ œ ์—ฌ๋Ÿฌ๋ถ„์€ Next.js์—์„œ ์“ธ ์ˆ˜ ์žˆ๋Š” ๋ฐ์ดํ„ฐ ํŽ˜์นญ์˜ ํ•ต์‹ฌ ๊ตฌ์กฐ๋ฅผ ๋ฐฐ์› ์Šต๋‹ˆ๋‹ค. ๊ทธ์ค‘ ์ผ..

Framework/Next.js 2022.11.22

[Next.js & React] ํŽ˜์ด์ง€ ์‚ฌ์ „ ๋ Œ๋”๋ง & ๋ฐ์ดํ„ฐ ํŽ˜์นญ

์ด ๊ธ€์€ udemy์˜ Next.js & React - ์™„๋ฒฝ ์ •๋ณต ๊ฐ€์ด๋“œ (incl. Two Paths) ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 86. ๋ชจ๋“ˆ ๊ฐœ์š” Next.js๋ฅผ ์ด์šฉํ•˜๋ฉด ํ’€์Šคํƒ React ์•ฑ์„ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Next.js๋Š” ์„œ๋ฒ„ ์‚ฌ์ด๋“œ์—์„œ ํŽ˜์ด์ง€๋ฅผ ์‚ฌ์ „ ๋ Œ๋”๋ง ํ•ด์ค๋‹ˆ๋‹ค. Next.js๋Š” ์ฝ”๋“œ ์‹คํ–‰์— ์žˆ์–ด์„œ ํด๋ผ์ด์–ธํŠธ ์‚ฌ์ด๋“œ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ React ์•ฑ์ด ์‹คํ–‰๋˜๋Š” ์‚ฌ์šฉ์ž์˜ ๋ธŒ๋ผ์šฐ์ € ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์„œ๋ฒ„ ์‚ฌ์ด๋“œ์—์„œ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•  ๋•Œ๋„ ๋„์›€์„ ์ค๋‹ˆ๋‹ค. ํŽ˜์ด์ง€์— ํ‘œ์‹œ๋˜์–ด์•ผ ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•˜๊ฑฐ๋‚˜ ๋กœ๋”ฉํ•˜๋Š” ์ž‘์—…์„ ๋•๋Š”๋‹ค๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ fetching์ด ๋ฌด์—‡์ธ๊ฐ€ Static VS Server-side Page ์–ด๋–ป๊ฒŒ ๋ฐ์ดํ„ฐ fetch ํ•˜๋Š”๊ฐ€ ์ด ์˜๋ฏธ์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์‚ดํŽด๋ณด๋„๋ก ํ•ฉ์‹œ๋‹ค. 87. ..

Framework/Next.js 2022.11.21

[Springboot] mongodb read preference ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

Intro ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” spring boot ์—์„œ mongodb read preference๋ฅผ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์ œ ๊ฒฝ์šฐ Spring boot ๋กœ ๊ตฌ์„ฑ๋œ ํ”„๋กœ์ ํŠธ์— monogo db read preference ๊ฐ€ ๋”ฐ๋กœ ์ ์šฉ๋˜์–ด ์žˆ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ read preference mode ์ค‘์—์„œ secondaryPreferred ๋ฅผ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. Read preference ์ฐธ๊ณ ๋กœ, Read preference๋ž€ MongoDB ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ฝ๊ธฐ ์ž‘์—…์„ replica set์˜ members์—๊ฒŒ route ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด 5๊ฐ€์ง€์˜ ๋ฐฉ์‹์ด ์žˆ์œผ๋ฉฐ, primary๊ฐ€ ๊ธฐ๋ณธ default ๊ฐ’์œผ๋กœ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค. primary (default mode..

[Next.js & React] ํŒŒ์ผ ๊ธฐ๋ฐ˜ ๋ผ์šฐํŒ… ์ž‘์—…ํ•˜๊ธฐ

์ด ๊ธ€์€ udemy์˜ Next.js & React - ์™„๋ฒฝ ์ •๋ณต ๊ฐ€์ด๋“œ (incl. Two Paths) ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 69. ๋ชจ๋“ˆ ๊ฐœ์š” ์ด๋ฒˆ ์„น์…˜์—์„œ๋Š” ์ด๋ฒคํŠธ ์•ฑ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋งŒ๋“ค์–ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด๋ฒคํŠธ ๋ชฉ๋ก์„ ํ™•์ธํ•˜๊ณ , ๊ทธ ์ค‘์—์„œ ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์„ ํƒํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. Creat a Complete NextJS Project From Scratch Add Static & Dynamic Routes Add Regular Components & Connect Everything! 70. ํ”„๋กœ์ ํŠธ ๊ณ„ํš / : Startign PAge (show featured Events) /events: Events Page (show all Events) /events/event> event-item..

Framework/Next.js 2022.11.13

[Next.js] Error: Invalid Link with a child. Please remove a or use Link legacyBehavior ์˜ค๋ฅ˜

Intro Next.js๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. Error: Invalid with child. Please remove or use Why? {props.children} next/link ๋ฅผ ํ™œ์šฉํ•˜์—ฌ Link ํƒœ๊ทธ ์•ˆ์— a ํƒœ๊ทธ๋ฅผ ๋„ฃ์–ด์คฌ๋˜ ์ฝ”๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์—๋Ÿฌ ํ™”๋ฉด์— ๋‚˜์™€์žˆ๋Š” Next.js ์‚ฌ์ดํŠธ์— ํ•œ๋ฒˆ ์ ‘์†ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. (https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor) Why This Error Occurred Next.js 13๋ฒ„์ „์ด ๋‚˜์˜ค๋ฉด์„œ, Link ํƒœ๊ทธ๋Š”๋กœ ๋ Œ๋”๋ง ๋˜๋ฏ€๋กœ ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์‹œ๋„๋Š” ์œ ํšจํ•˜์ง€ ์•Š๋‹ค๊ณ  ํ•˜๋„ค์š”! How to solve the problem npx @next/co..

Framework/Next.js 2022.11.08

[Next.js] Error: The default export is not a React Component in page: "/" ์˜ค๋ฅ˜

Intro next js ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. Error: The default export is not a React Component in page: "/" Why? ์—๋Ÿฌ๊ฐ€ ๋‚œ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•ด๋ณด๋‹ˆ, export ๋งŒ ํ•˜๊ณ  default ๋ฅผ ์ ์–ด์ฃผ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. Next.js์—์„œ๋Š” default๋กœ export๋ฅผ ํ•ด์•ผ ์—๋Ÿฌ ์—†์ด ์ •์ƒ ์ž‘๋™ ๋˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. export function HomePAge() { const featuredEvents = getFeaturedEvents(); return ( ); } How to solve the problem export default ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๐Ÿ™Œ export default function HomePAge() { ..

Framework/Next.js 2022.11.08

[Next.js & React] ํŽ˜์ด์ง€ & ํŒŒ์ผ ๊ธฐ๋ฐ˜ ๋ผ์šฐํŒ…

์ด ๊ธ€์€ udemy์˜ Next.js & React - ์™„๋ฒฝ ์ •๋ณต ๊ฐ€์ด๋“œ (incl. Two Paths) ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 52. ๋ชจ๋“ˆ ๊ฐœ์š” ํŒŒ์ผ ๊ธฐ๋ฐ˜์˜ routing, ์ •์  ๋ฐ ๋™์  routes, ํŽ˜์ด์ง€๊ฐ„์˜ ๋„ค๋น„๊ฒŒ์ดํŒ…์— ๋Œ€ํ•ด ๋ฐฐ์šธ ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. 53. ์‹œ์ž‘ ์„ค์ • Setup ์‚ฌ์ดํŠธ ์†Œ์Šค ์ฝ”๋“œ ์ฐธ๊ณ  54. ํŒŒ์ผ ๊ธฐ๋ฐ˜ ๋ผ์šฐํŒ…์ด๋ž€ ๋ฌด์—‡์ผ๊นŒ? React.js๋Š” react-router-dom์„ ์‚ฌ์šฉํ•˜์—ฌ, ๋ผ์šฐํŠธ๋ฅผ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ Next.js๋Š” ๋ผ์šฐํ„ฐ๋ฅผ ์„ค์น˜ํ•˜์ง€ ์•Š๊ณ , ๋ผ์šฐํŠธ์™€ ํŽ˜์ด์ง€ ๊ตฌ์กฐ๋ฅผ ์ •์˜ํ•˜๋Š” ๋ฐ JSX์™€ JS ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. Next.js์—์„œ๋Š” React ์ปดํฌ๋„ŒํŠธ ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ํŠน๋ณ„ํ•œ ํด๋”์— ์ผ๋ฐ˜์ ์ธ React ์ปดํฌ๋„ŒํŠธ ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ Next.js๊ฐ€ ์„ค์ •๋œ ํด..

Framework/Next.js 2022.11.04

[Next.js & React] ์‹œ์ž‘ํ•˜๊ธฐ

์ด ๊ธ€์€ udemy์˜ Next.js & React - ์™„๋ฒฝ ์ •๋ณต ๊ฐ€์ด๋“œ (incl. Two Paths) ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 1. Welcome to the Coursel ์‹œ์ž‘ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๊พธ์ค€ํžˆ ํ™”์ดํŒ… ๐ŸคŸ๐ŸคŸ 2. Next.js๋ž€ ๋ฌด์—‡์ธ๊ฐ€? Next.js๋ฅผ ์™œ ์‚ฌ์šฉํ•˜๋Š” ๊ฑธ๊นŒ? NextJS๋Š” ํ”„๋กœ๋•์…˜์šฉ React ํ”„๋ ˆ์ž„ ์›Œํฌ ์ž…๋‹ˆ๋‹ค. ํฐ ๊ทœ๋ชจ์˜ ํ”„๋กœ๋•์…˜์šฉ React ์•ฑ์„ ์‰ฝ๊ฒŒ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ๋งŽ์€ ๊ธฐ๋Šฅ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ReactJS๋Š” ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌ์ถ•์„ ์œ„ํ•œ JS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค. ์ฆ‰ Third Party ํŒจํ‚ค์ง€๋กœ ํ”„๋ก ํŠธ ์—”๋“œ ํ”„๋กœ์ ํŠธ์— ์ถ”๊ฐ€๋˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ž…๋‹ˆ๋‹ค. ๊ฒฐ๊ตญ ํด๋ผ์ด์–ธํŠธ ์ธก JavaScript ์ฝ”๋“œ๋ผ๋Š” ์ด์•ผ๊ธฐ ์ž…๋‹ˆ๋‹ค. ์ฃผ๋กœ ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค ๋ถ€๋ถ„์ธ ์ปดํฌ๋„ŒํŠธ,..

Framework/Next.js 2022.11.02

[React ์™„๋ฒฝ ๊ฐ€์ด๋“œ] section 11 : Practice Project: Building a Food Order App

์ด ๊ธ€์€ udemy์˜ React ์™„๋ฒฝ ๊ฐ€์ด๋“œ with Redux, Next.js, TypeScript ๊ฐ•์ขŒ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. 139. ๋ชจ๋“ˆ ์†Œ๊ฐœ ์ง€๋‚œ ์„น์…˜์—์„œ ์ค‘์š”ํ•œ ๋ฆฌ์•กํŠธ ๊ฐœ๋…๋“ค์„ ์‚ดํŽด๋ณด์•˜์Šต๋‹ˆ๋‹ค. useEffect, useContext, useReducer ๋“ฑ๋“ฑ / ์œ„ ๊ฐœ๋…์„ ๋ณต์Šตํ•˜๋ฉด์„œ ๋‹ค์‹œ ์‚ดํŽด๋ณด๋„๋ก ํ•ฉ์‹œ๋‹ค. 140. ์„ค์ • ์‹œ์ž‘ํ•˜๊ธฐ Layout folder : ex. Header UI folder: ex. Input 141. "ํ—ค๋”" ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ํ•˜๊ธฐ header ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ 142. Adding the "Cart" Button Component Cart Button ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ 143. Adding a "Meals" Component Meals ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€ 144. Adding I..

๋ฐ˜์‘ํ˜•