You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
모든 Vue UI 이슈가 공유할 토대를 만든다. frontend/에 Vite + Vue 3 + Tailwind 프로젝트를 세우고, Gradle이 빌드 산출물을 src/main/resources/static/으로 출력해 같은 오리진(8080)에서 서빙하도록 통합한다. History 라우팅을 위한 Spring SPA fallback과 공통 인프라(레이아웃·API 클라이언트·auth 스토어)를 구축한다.
작업 내용
frontend/ 생성 (Vite + Vue 3 + JS), vite.config.js: dev proxy(5173→8080 /api), outDir=../src/main/resources/static, assetsDir=assets, @ alias
Tailwind v4(@tailwindcss/vite) + @theme 디자인 토큰(바이닐 블랙/크림/골드/러스트), Pretendard·디스플레이 폰트
목적
모든 Vue UI 이슈가 공유할 토대를 만든다.
frontend/에 Vite + Vue 3 + Tailwind 프로젝트를 세우고, Gradle이 빌드 산출물을src/main/resources/static/으로 출력해 같은 오리진(8080)에서 서빙하도록 통합한다. History 라우팅을 위한 Spring SPA fallback과 공통 인프라(레이아웃·API 클라이언트·auth 스토어)를 구축한다.작업 내용
frontend/생성 (Vite + Vue 3 + JS),vite.config.js: dev proxy(5173→8080/api),outDir=../src/main/resources/static,assetsDir=assets,@alias@tailwindcss/vite) +@theme디자인 토큰(바이닐 블랙/크림/골드/러스트), Pretendard·디스플레이 폰트build.gradle.ktsnode-gradle 통합:npmInstall→frontendBuild→processResources.dependsOn,-PskipFrontend가드SpaForwardConfig(WebMvcConfigurer, 점 없는 1~3 depth 경로forward:/index.html)SecurityConfigSPA 라우트 GET permitAll 배열 추가 (실데이터는 여전히/api/v1/**토큰 검증).gitignore에frontend/node_modules,static/추가api/client.js(axios): baseURL/api/v1, Bearer 자동, 401 refresh 1회 공유 재시도, Idempotency-Key 헬퍼, ProblemDetail → ApiErrorstores/auth.js(Pinia, 토큰 localStorage·JWT 디코드),stores/ui.js(토스트), 공통 레이아웃(TheHeader/TheFooter/SearchBar)·base 컴포넌트완료 조건 (DoD)
./gradlew bootRun(통합 빌드) 시http://localhost:8080/SPA 로드,/cart등 직접 진입·새로고침 시 fallback 정상(401/404 없음)npm run dev(5173) 프록시로GET /api/v1/albums성공, HMR 동작./gradlew check그린선행 / 관련
비고
History 라우팅이라 SPA forward 필요(해시 대비 차이). 빌드 산출물은 커밋 제외, 소스 진실은
frontend/. CI가 프론트를 빌드하지 않으면 배포 산출물 누락 주의(메모 CI GOTCHA).