문서의 이전 판입니다!
스프링부트 프로젝트와 리액트 프로젝트를 각각 생성하여 개발환경 구축하기.
// 데이터로 사용할 객체생성 @Getter public static class User { int id; String username; String passwd; String email; public User(int id, String username, String passwd, String email) { this.id = id; this.username = username; this.passwd = passwd; this.email = email; } }
@RestController public class HiReactController { // 리액트로부터 요청받을 주소로 매핑 @PostMapping("/api/users") public User user() { System.out.println("::: HiReactController IN :::"); User user = new User(1, "eleven", "1234", "jskim@repia.com"); return user; } }