IT/Spring

React 프로젝트 Spring으로 가져오기

iamhyeon 2024. 12. 31. 15:02

✅ DashboardController.java 만들기

 

 


✅ proxy 변경

✅ "proxy": "http://localhost:8080"  ➡️  "homepage": "/dashboard"

 

 

✅ yarn start 후 페이지 뜨는 것 확인 후

 

yarn build


✅ build 후 index.html 이름 변경   dashboard.html  (컨트롤러 맵핑 주소 맞춤)


✅ Spring 프로젝트의 📁templates 폴더 안에 dashboard.html   복붙

 

✅  📁 resources > static > dashboard 폴더 만들기

✅ dashboard 폴더 안에 yarn build 후 생성된 파일 중 html 파일 제외하고 모두 복사


✅ spring 재가동 

 

끝 !

반응형

'IT > Spring' 카테고리의 다른 글

HikariCP  (1) 2025.07.12
RestTemplate WebClient RestClient  (2) 2025.01.23
mybatis error ( @Options )  (0) 2024.12.24
Swagger  (1) 2024.12.24
Mapper Error (@ResultMap)  (0) 2024.12.04