{"id":25019728,"url":"https://github.com/donghl-dev/study-springboot2","last_synced_at":"2026-05-05T21:36:59.923Z","repository":{"id":126966330,"uuid":"163980890","full_name":"donghL-dev/Study-SpringBoot2","owner":"donghL-dev","description":"2019 겨울방학부터 진행한 Spring Boot 스터디","archived":false,"fork":false,"pushed_at":"2019-05-10T12:28:57.000Z","size":446,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T11:52:08.249Z","etag":null,"topics":["oauth2","restful-api","spring-boot","spring-data-jpa","spring-mvc","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donghL-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-03T14:06:48.000Z","updated_at":"2020-03-29T07:36:26.000Z","dependencies_parsed_at":"2023-06-19T08:55:12.570Z","dependency_job_id":null,"html_url":"https://github.com/donghL-dev/Study-SpringBoot2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donghL-dev%2FStudy-SpringBoot2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donghL-dev%2FStudy-SpringBoot2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donghL-dev%2FStudy-SpringBoot2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donghL-dev%2FStudy-SpringBoot2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donghL-dev","download_url":"https://codeload.github.com/donghL-dev/Study-SpringBoot2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301996,"owners_count":20755514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oauth2","restful-api","spring-boot","spring-data-jpa","spring-mvc","spring-security"],"created_at":"2025-02-05T11:51:29.557Z","updated_at":"2026-05-05T21:36:54.897Z","avatar_url":"https://github.com/donghL-dev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Study-Spring Boot 2\n===\n* 최신 버전의 스프링 부트 2.0(또는 2.0 이후의 버전)에 대해 스터디를 진행하면서 자료를 정리해두기 위한 저장소입니다. \n* 스터디를 진행하면서 공부하는 책은 [처음 배우는 스프링 부트 2](http://www.hanbit.co.kr/store/books/look.php?p_code=B4458049183) 라는 책입니다.\n* 위 책의 특징으로는 커뮤니티 게시판을 구현하며 배울 수 있도록 예제 중심으로 구성되어 있습니다.\n* 2019 겨울방학 **Spring Boot 2 Study**\n  * 인원 : [민경환](https://github.com/ber01/Study-Spring-Boot), [박동현](https://github.com/pdh6547/study-spring-boot), [신무곤](https://github.com/mkshin96/study-spring-boot), [신재홍](https://github.com/woghd9072/study-spring-boot), [양기석](https://github.com/yks095/study-spring-boot), [엄태균](https://github.com/etg6550/2019WinterProject), [임동훈](https://github.com/dongh9508/Study-SpringBoot2), [최광민](https://github.com/rhkd4560/Study-SpringBoot), [하상엽](https://github.com/hagome0/Study-Spring-Boot)\n\n  * 스터디 진행 **방향** 및 **목적**\n    \n    * 스프링 부트의 기본 개념을 이해하고 커뮤니티 게시판 구축\n\n    * 참여 인원 모두가 개인 프로젝트 진행\n    * 용어 정리 및 공유, 소스코드 피드백 \n\n* 스터디를 진행하며 모르는 용어는 [Keyword](https://github.com/dongh9508/Study-SpringBoot2/tree/master/keyword)에 정리하면서 진행하고 있습니다.\n* 개발환경\n\n  |      도구            | 버전      | \n    ----------------- | ---------------------------- | \n  | **OS** | Windows 10(64-bit), Mac OS  | \n  |  **IDE**  | IntelliJ IDEA  |\n  |  **JDK**  | JDK 8          | \n\n### Study-Day-1\n\n  * application.yml 생성 및 test property 값 추가 \n\n  * @Value 어노테이션 테스트\n  * @ConfigurationProperties 어노테이션 테스트\n\n### Study-Day-2\n\n  * 자동 환경 설정 어노테이션 살펴보기\n\n  * H2 Console 자동 설정 적용해보기\n  * @SpringBootTest 어노테이션 테스트 및 실습\n  * @WebMVCTest 어노테이션 테스트 및 실습 \n\n### Study-Day-3\n\n  * @DataJpaTest 어노테이션 테스트 및 실습\n\n  * @RestCilentTest 어노테이션 테스트 및 실습\n  * @JsonTest 어노테이션 테스츠 및 실습\n\n### Study-Day-4\n\n  * 커뮤니티 게시판 설계\n  \n  * 커뮤니티 게시판 프로젝트 'Spring-Boot-Community-Web' 생성\n    * 프로젝트 의존 라이브러리 6개 구성\n    \n      * Web, Thymeleaf, JPA, DevTools, lombook, H2\n\n  * 도메인 매핑 및 도메인 테스트하기\n    * 도메인 매핑 : JPA를 사용하여 DB와 도메인 클래스를 연결시켜주는 작업\n\n### Study-Day-5\n\n  * BoardService, BoardController 클래스 생성.\n  \n  * CommandLineRunner를 사용하여 DB에 데이터 넣기.\n\n  * 게시판 리스트 기능과 페이징 처리 및 등록 폼 생성(**Thymeleaf** 활용)\n  * H2-console 확인\n    ```\n    application.properties\n\n    spring.thymeleaf.cache=false\n\n    spring.jpa.hibernate.ddl-auto=update\n    spring.jpa.generate-ddl=true\n    spring.jpa.show-sql=true\n\n    spring.h2.console.enabled=true\n\n    logging.level.org.hibernate=info\n    logging.level.org.springframework.web=info\n    \n    url : http://localhost:8080/h2-console/\n    ```\n\n### Study-Day-6\n\n  * 스프링 부트 시큐리티, OAuth2 개념 이해하기.\n\n  * OAuth2의 제공하는 4가지 승인 타입 중 **권한 부여 승인 코드 타입** 이해 및 적용.\n\n    * 소셜 미디어 타입 정보를 나타내는 SocialType enum 객체 생성.\n\n    * User 클래스에 인증을 위한 principal(키값), socialType(인증여부) 컬럼 추가.\n\n  * 스프링 부트 시큐리티 + OAuth2 의존성 설정.\n  \n  * OAuth2를 사용하기 위한 페이스북, 구글, 카카오 개발자 센터 연동.\n\n    * 클라이언트 ID 및 클라이언트 Secret 발급.\n\n\n### Study-Day-7\n\n  * 스프링 부트 1.5.14 버전 다운 그레이드\n\n  * SNS 프로퍼티 설정 및 바인딩\n\n    * ClientResources 클래스 생성\n\n  * 시큐리티와 OAuth2 설정\n\n    * SecurityConfig 클래스 생성.\n\n    * UserTokenService 클래스 생성.\n\n### Study-Day-8\n\n  * 어노테이션 기반으로 User 정보 불러오기.\n\n    * LoginController 클래스 생성\n\n    * UserArgumentResolver 클래스 생성\n\n    * WebApplication 클래스에 UserArgumentResolver 등록\n\n    * SocialUser 어노테이션 생성\n\n  * 인증 권한 확인 및 페이지 권한 분리\n\n### Study-Day-9\n\n  * 챕터 5의 전반적인 내용이 이해가 가지 않아서 처음부터 진행\n\n    * 소셜 미디어 타입 정보를 나타내는 enum 객체 생성\n\n      * Facebook, Google, Kakao\n\n    * User 클래스에 socialType, principal 컬럼 추가.\n\n      * socialType : 어떤 소셜 미디어로 인증 받았는지 여부를 나타냄.\n\n      * principal : OAuth2 인증으로 제공받는 키 값.\n\n    * 소셜 미디어 리소스 정보 추가\n\n    * 소셜 미디어 리소스 프로퍼티를 객체로 매핑하는 ClientResoucre 클래스 생성\n\n    * 각 소셜 미디어의 프로퍼티 값을 호출하는 SecurityConfig 클래스 생성 후 Bean 등록\n\n    * 시큐리티 설정을 위한 SecurityConfig 클래스 수정\n\n### Study-Day-10\n\n  * OAuth2 설정을 위한 SecurityConfig 클래스 수정\n\n    * OAuth2를 사용하기 위해 @EnableOAuth2Client 어노테이션 추가\n\n      * @EnableOAuth2Client를 사용함으로써 두 개의 빈을 생성해야 한다.\n      \n        * 현재 요청과 컨텍스트를 저장하는 필터 빈과 AccessTokenRequest 타입 빈 생성\n\n    * 액세스 토큰 및 권한 서버의 응답값을 받기 위한 OAuth2ClientContext 객체 생성\n\n    * 현재 요청과 컨텍스트를 저장하는 필터인 oauth2ClientFilterRegistration 메소드 생성\n\n    * 소셜 미디어 로그인 관련 필터인 oauth2Filter() 메소드 생성\n\n### Study-Day-11\n\n  * 스프링 부트 2.0 버전으로 의존성 업그레이드\n\n    *  build.gradle 업데이트\n  \n  * 스프링 부트 2.0 방식의 OAuth2 인증 재설정\n\n    * application.yml 내용 수정 및 업데이트\n\n    * 카카오 정보를 담은 CustomOAuth2Provider 클래스 생성.\n\n    * 변경된 시큐리티 + OAuth2 설정을 위한 SecurityConfig 클래스 대폭 수정.\n\n    * 요청 서공시 URI 변경을 위한 LoginController 클래스 수정\n\n    * 요청 스크립트 코드 변경을 위한 login.html 수정\n\n    * UserArgumentResolver 클래스에 User 정보를 받아오는 부분 추가.\n\n### Study-Day-12\n\n  * CHAPTER 6 진입.\n\n  * REST와 RESTful에 대해 알아보기.\n\n    * REST와 RESTful의 개념에 대한 이해\n\n    * RESTful의 제약 조건에 대한 이해\n\n  * REST API 설계에 대한 이해\n\n  * REST API 설계의 두가지 방법\n\n    * MVC 패턴을 활용하는 방법\n\n    * 스프링 부트 데이터 레스트를 활용하는 방법\n\n### Study-Day-13\n\n  * 커뮤니티 게시판의 form.html에 Ajax 통신용 스크립트 코드 추가.\n\n  * 커뮤니티 게시판 프로젝트에 MySQL을 연동하기 위한 런타임 의존성 추가.\n\n  * 커뮤니티 게시판 프로젝트의 application.yml에 MySQL 연동을 위한 설정하기.\n\n  * Spring-Boot-Community-Rest 프로젝트 생성\n\n    * rest-web 모듈과 data-rest 모듈 생성.\n\n    * rest-web 모듈에 MVC 패턴을 활용하는 REST API를 구현하기.\n\n      * rest-web 디렉터리 구조 맞추기.\n\n      * BoardType, SocialType, Board, User, BoardRepository, UserRepository, BoardRestController, RestWebApplication 클래스 생성.\n\n      * CORS 허용 및 시큐리티 설정을 위한 RestWebApplication 클래스 수정\n\n      * 커뮤니티 게시판에 생성, 삭제, 수정 연동을 위해 BoardRestController 클래스 수정\n\n    * data-rest 모듈에 스프링 부트 데이터 레스트로 REST API를 구현하기.\n\n      * rest-web 모듈에서 작성했던 Board, User, SocialType, BoardType 클래스를 그대로 생성.\n\n      * BoardRepository, UserRepository 인터페이스에 @RepoistoryRestResoucre 어노테이션을 추가.\n\n      * [결과 확인](https://github.com/dongh9508/Study-SpringBoot2/blob/master/keyword/LINK/result/result1.md)\n\n      * @RepositoryRestController를 사용하여 REST API 구현하기\n\n        * @RepositoryRestController를 사용한 BoardRestController 클래스 생성.\n\n        * [결과 확인](https://github.com/dongh9508/Study-SpringBoot2/blob/master/keyword/LINK/result/result2.md)\n\n### Study-Day-14\n\n  * data-rest 모듈에 스프링 부트 데이터 레스트로 REST API 구현하기.\n\n    * 게시글 생성, 수정, 삭제, 연동 테스트\n\n    * 프로젝션으로 노출 필드 제한하기\n\n    * 각 메서드 권한 제한\n\n  * 이벤트 바인딩\n\n  * URI 처리\n\n### Study-Day-15\n\n  * 챕터 4부터 6까지 이해가지 않는 부분 내용들 검토 및 정리.\n\n### Study-Day-16\n\n  * 챕터 6 종료 및 챕터 4 복습 시작\n\n  * 커뮤니티 게시판 프로젝트 생성(Spring-Boot-Community-Web2)\n\n  * 프로젝트 의존성 구성\n\n    * build.gradle 수정\n\n  * 도메인 패키지 생성\n\n    * Board, User 클래스 생성\n\n  * 레포지토리 패키지 생성\n\n    * BoardRepoistory, UserRepository 인터페이스 생성\n\n  * 도메인 테스트\n\n  * 서비스 패키지 생성\n\n    * 핵심 비지니스 로직을 담당하는 BoardService 클래스 생성\n\n  * 컨트롤러 패키지 생성\n\n    * BoardController 클래스 생성\n\n      * 클라이언트로부터 요청을 받아오고 서비스로부터 데이터를 받아와 뷰를 바인딩하는 역할을 함.\n\n  * CommandLineRunner를 통한 H2 DB에 데이터 삽입\n\n  * [다양한 형식의 게시판 출력](https://github.com/dongh9508/Study-SpringBoot2/blob/master/keyword/LINK/result/Board.md)\n\n    * 페이징 형식 출력\n\n    * 페이징 형식 역순 출력\n\n    * 리스트 형식 출력\n\n    * 리스트 형식 역순 출력\n\n  * 게시판의 '#' 클릭시에 게시글의 역순출력과 정상출력이 가능하도록 구현.\n\n    * list2.html 생성, BoardController에 list2 메소드를 생성하여 /list2 url을 getmapping 으로 매핑함.\n\n  * Web 프로젝트에 MySQL 연동.\n\n\n### Study-Day-17\n\n  * 챕터 6 복습 시작\n\n  * Spring-Boot-Community-Rest2 프로젝트 생성\n\n    * MySQL 연동 및 의존성 설정\n\n    * 포트 변경 및 프로퍼티 설정\n  \n  * CORS 허용 및 시큐리티 설정\n\n  * 생성, 수정. 삭제 구현\n\n\n### Study-Day-18\n\n  * 챕터 5 복습 시작\n\n  * OAuth2를 이용한 로그인 연동을 위한 소셜 네트워크 연동\n\n    * Facebook, Google, KaKao 개발자센터 연동\n\n    * client-id, client-secret 발급 및 application.yml 수정\n  \n  * User 클래스에 소셜 정보를 위한 컬럼 추가.\n\n  * 카카오 로그인 연동을 위한 CustomOAuth2Provider 클래스 생성 \n\n  * Security와 OAuth2 설정을 위한 SecurityConfig 클래스 생성\n\n  * 로그인 url 매핑을 위한 LoginController 클래스 생성\n\n  * 토큰 값을 이용하여 User 정보 저장을 위한 UserArgumentResolver 클래스 생성\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonghl-dev%2Fstudy-springboot2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonghl-dev%2Fstudy-springboot2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonghl-dev%2Fstudy-springboot2/lists"}