본문 바로가기

728x90

전체 글

(33)
React와 springBoot 연동 시키기 기본적으로 웹 페이지의 구동방식은 프론트에서 백으로 요청을 보내고 백에선 받은 요청을 처리한 뒤 반환값을 프론트로 보내는 방식으로 구동된다. 하지만 React에서 이 같은 방식으로 springBoot에 요청을 보내게 되면 브라우저의 Same-Origin Policy 때문에 정상적인 호출이 안된다. 동일 출처 정책(Same-Origin Policy)웹에는 기본적으로 동일 출처 정책이라는 보안 정책이 적용되어 있는데 이 정책은 프로토콜, 도메인, 포트 번호가 동일한 출처에서 오는 자원에만 접근할 수 있도록 제한해 준다. 이 같은 제한이 필요한 이유는 예를 들어 A사이트에서 로그인하여 토큰을 발급받은 상태에서 B사이트에서 A사이트로 api 요청을 하면 A사이트에서 발급된 토큰이 자동으로 첨부되어 사용자인척 요..
mysql 의존성을 찾지 못하는 경우 Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception with message: Cannot load driver class: com.mysql.cj.jdbc.Driver DB로 MySQL을 사용하는 경우 springboot 초기 설정할 때 다음과 같이 설정할 텐데 dependencies { run..
Renaming project error가 발생했을 때 SpingBoot에서 Project명을 수정했을 때 간혹 이러한 에러가 뜬다. Project at 'C:\project\springBoot\(이상한 프로젝트명)' can't be named '(프로젝트명)' because it's located directly under the workspace root. If such a project is renamed, Eclipse would move the container directory. To resolve this problem, move the project out of the workspace root or configure it to have the name '(이상한 프로젝트명)'. 위와 같은 에러가 떴다면 해결방법은 간단하다. 1. setttin..

728x90