๐ฎ ํ๋ก๊ทธ๋๋ฐ/๐ฉ๐ป ๊ฐ๋ฐ ๊ณต๋ถ31 [Springboot] ์๋ฐ ์คํ๋ง๋ถํธ Swagger ๊ธฐ๋ณธ ์ค์ ํ์คํ ๋ฏธ๋ ํ๋ก์ ํธ๋ฅผ ์งํํ๋ฉด์ ๋ฉ๋ชจํ๋์๋ฐ ์คํ๋ง๋ถํธ ์ค์จ๊ฑฐ ์ค์ ๐ฅ ๊ธฐ๋ณธ URL = http://localhost:8080/swagger-ui/index.html#/ ๐ฅ ๋๋ ํ ๋ฆฌ = java/com/example/{ํ๋ก์ ํธ ์ด๋ฆ}/global/config ๐ฅ build.gradle ์์กด์ฑ ์ถ๊ฐ ๋ด์ฉ// swagger implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0' ๐ฅ SwaggerConfig ๊ธฐ๋ณธ ์ฝ๋package com.example.kiosk_be.global.config;import io.swagger.v3.oas.annotations.OpenAPIDefinition;import io.swagger... 2025. 5. 1. [NextJS] SSR ์ปดํฌ๋ํธ vs CSR ์ปดํฌ๋ํธ (Server Component์ Client Component), ํ์ด์ง ๋ก๋ฉ ์ฌ์ฉ์ ๊ฒฝํ ๋ฌธ์ ํด๊ฒฐ Next.js - Server Component์ Client ComponentNext.js 13๋ถํฐ app ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๊ฐ ๋์ ๋๋ฉด์, ์ปดํฌ๋ํธ๊ฐ ์๋ฒ(Server) ์ปดํฌ๋ํธ์ธ์ง, ํด๋ผ์ด์ธํธ(Client) ์ปดํฌ๋ํธ์ธ์ง ๊ตฌ๋ถํ๋ ๊ฒ์ด ๋งค์ฐ ์ค์ํด์ก์ต๋๋ค.์ด ๊ธ์์๋ Server Component์ Client Component๊ฐ ๋ฌด์์ธ์ง, ๊ฐ๊ฐ ์ด๋ค ํน์ง๊ณผ ์ฅ๋จ์ ์ ๊ฐ์ง๋์ง, ๊ทธ๋ฆฌ๊ณ ์ธ์ ์ด๋ค ๊ฑธ ์ ํํด์ผ ํ๋์ง ์ฝ๊ฒ ์ ๋ฆฌํด๋ณด๊ฒ ์ต๋๋ค.Server Component๋?Next.js์์ page.tsx๋ layout.tsx ์ปดํฌ๋ํธ๋ค์ ๊ธฐ๋ณธ์ ์ผ๋ก Server Component์ ๋๋ค.Server Component๋ ์๋ฒ์์ ๋ ๋๋ง๋๊ณ , ์ต์ข ๊ฒฐ๊ณผ๋ง HTML๋ก ๋ธ๋ผ์ฐ์ ์ ์ ๋ฌ๋ฉ๋๋ค.โ Server Compone.. 2025. 4. 26. [NextJS] ์ด๋ฏธ์ง๋ฅผ ๋ ๋๋งํ๋ ๋ ๊ฐ์ง ๋ฐฉ๋ฒ : img vs Image ํ๊ทธ ๋น๊ต Next.js์์ img์ Image ์ปดํฌ๋ํธ ๋น๊ตNext.js๋ก ์น ๊ฐ๋ฐ์ ํ๋ค ๋ณด๋ฉด ์ด๋ฏธ์ง ํ๊ทธ๋ฅผ ์ฝ์ ํ ๋ ๋ ๊ฐ์ง ์ ํ์ง๊ฐ ์๋ค. ๋ฐ๋ก HTML ๊ธฐ๋ณธ ํ๊ทธ์ธ ์ Next.js๊ฐ ์ ๊ณตํ๋ ์ปดํฌ๋ํธ๋ค. ๋น์ทํด ๋ณด์ด์ง๋ง, ๋ ๋ฐฉ๋ฒ์ ๋ด๋ถ ๋์ ๋ฐฉ์, ์ฑ๋ฅ ์ต์ ํ, ์ฌ์ฉ ํธ์์ฑ ์ธก๋ฉด์์ ์๋นํ ๋ค๋ฅด๋ค. Next.js๋ฅผ ์ฌ์ฉํ๋ ๋ชฉ์ ์์ฒด๊ฐ ์ต์ ํ๋ React ๊ฐ๋ฐ์ด๊ธฐ ๋๋ฌธ์, ์ด๋ฏธ์ง ๋ํ ์ ์ฉ ์ปดํฌ๋ํธ๋ฅผ ์ ๊ทน ํ์ฉํ๋ ๊ฒ์ด ๋ฐ๋์งํ๋ค."๋น ๋ฅด๊ณ ๊ฐ๋ฒผ์ด ์น ์๋น์ค" ๋ฅผ ๋ชฉํ๋ก ํ๋ค๋ฉด, Next.js์ ๋ฅผ ์ฌ์ฉํ์! 1. ๊ธฐ๋ณธ ์ ์ ์ ์HTML ํ์ค ์ด๋ฏธ์ง ํ๊ทธNext.js ์ ์ฉ ๊ณ ์ฑ๋ฅ ์ด๋ฏธ์ง ์ปดํฌ๋ํธ์ ๊ณต ์ฃผ์ฒด๋ธ๋ผ์ฐ์ ํ์คNext.js (next/image ๋ชจ๋)2. ๋์ ๋ฐฉ์ ํ๊ทธ๊ทธ๋ฅ HTML ๊ทธ ์์ฒด.. 2025. 4. 26. [NextJS] ๋ผ์ฐํ ์์คํ ์ข ๋ฅ - app vs pages ๋๋ ํ ๋ง ๋ฐฉ๋ฒ ๋น๊ต, ํด๋ ๊ตฌ์กฐ ์์, useRouter ์ค๋ฅ ๋๋ฒ๊น Next.js์์ app ๋๋ ํ ๋ฆฌ์ pages ๋๋ ํ ๋ฆฌ๋๊ฐ๊ฐ ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ํ์ด์ง ๋ผ์ฐํ ์ ์ฒ๋ฆฌํ๋ ๋ ๊ฐ์ง ๋ฐฉ๋ฒ์ ์ ๊ณตํฉ๋๋ค.1. pages ๋๋ ํ ๋ฆฌimport { useRouter } from 'next/router'; ์ฌ์ฉ/pages ๊ตฌ์กฐ ์์ index.tsx → / about.tsx → /about # ๐ค ์ฌ์ฉ์์ฉ client/ dashboard.tsx → /client/dashboard profile.tsx → /client/profile blog/ [id].tsx → /client/blog/:id # ๐ ๊ด๋ฆฌ์์ฉ admin/ i.. 2025. 4. 25. [React] Redux ๊ฐ๋ ๋ฐ ์ญํ , ํ์ผ ๊ตฌ์กฐ ๋๋ ํ ๋ง ๊ฐ๋ฐ์ ์ฒ์ ์งํํ ๋๋ ๋ฆฌ๋์ค ๋ด์ฉ์ ํ ํ์ผ์๋ค๊ฐ ๋ชจ์๋๋ค๊ฐ,์ธํด ํ๋ฉด์ ๋๋ ํ ๋ง ํ๋ ๋ฐฉ๋ฒ์ ๋ฐฐ์ ์๋๋ฐ ๋ ์จ๋จน์ ์ผ์ด ์๊ฒจ ๊ธฐ๋กํด๋๋ค. Redux๋ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํ๋ฅผ ํ๊ณณ์์ ๊ด๋ฆฌํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ด๋ค. ์ฌ๋ฌ ์ปดํฌ๋ํธ์์ ๊ฐ์ ๋ฐ์ดํฐ๋ฅผ ๊ณต์ ํ ๋ ์ ์ฉํ๋ค. 1๏ธโฃ Redux ํ์ผ ๊ตฌ์กฐ (in React typescript) /redux /actions # ์ก์ ์ ์ (์ด๋ฒคํธ ๋ฐ์ ์ ํ์ํ ๋ฐ์ดํฐ ์ ์) categoryActions.ts /reducers # ๋ฆฌ๋์ ์ ์ (์ํ๊ฐ ์ด๋ป๊ฒ ๋ณ๊ฒฝ๋ ์ง ๊ฒฐ์ ) categoryReducer.ts store.ts # ์คํ ์ด ์ค์ (์ ์ฒด ์ํ ๊ด๋ฆฌ) ๊ฐ ํ์ผ์ Redux์ ํต์ฌ ์์์ธ ์ก์ (Acti.. 2025. 2. 27. [React] Hook "useState" is called in function ~ that is neither a React function component nor a custom React Hook function. Error :React Hook "useState" is called in function "windowFour" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".eslintreact-hooks/rules-of-hooks -> ์ปดํฌ๋ํธ ํจ์ ์ด๋ฆ ์ฒซ ๋ฌธ์๋ฅผ ๋๋ฌธ์๋ก ๋ฐ๊ฟ์ฃผ๋ฉด ํด๊ฒฐ๋๋ค. ๋ฆฌ์กํธ์ ์ปดํฌ๋ํธ๋ ํญ์ ๋๋ฌธ์๋ก ์์ํ ๊ฒ!!!! 2025. 2. 5. ์ด์ 1 2 3 4 ยทยทยท 6 ๋ค์ 728x90 ๋ฐ์ํ