binchoo / spring-boot-210523 Goto Github PK
View Code? Open in Web Editor NEW스프링 부트와 AWS로 혼자 구현하는 웹 서비스 정독하기
스프링 부트와 AWS로 혼자 구현하는 웹 서비스 정독하기
[이슈 내용]
인텔리제이 시작할 때, 해당 오류창 등장하여 시동되지 않는 현상.
[이슈 원인]
윈도우에서 도커가 존재할 때, Hyper-V가 포트를 점유한 현상.
챕터: #2
[이슈 내용]
Application 실행 시 finished with non-zero exit value 1
에러 발생
[이슈 원인]
이미 8080번으로 듣고 있는 프로세스가 있다.
[무스터치 문법 정리 부탁해요~]
챕터: #11
resources/static
아래에 스태틱 파일들을 몰아 넣어두면 오른편과 같이 URL 매핑이 정해진다.
src/main/resources/static/js/..
: http://도메인/js/..
src/main/resources/static/css/..
: http://도메인/css/..
src/main/resources/static/image/..
: http://도메인/image/..
챕터: #11
[이슈 내용]
삭제 버튼 클릭 시, 요청 전송 후 405 Method Not Allowed 응답이 되돌아 왔다.
챕터: #2
[런타임 익셉션]
[Exception] ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
[이슈 원인]
본인 JDK 버전이 높아 저자가 사용하는 스프링 버전(2.1.7.RELEASE
)과 호환되지 않음.
TDD 습관을 들이기 내용
텍스트 응답 테스팅
롬복 라이브러리
DTO, json 응답 테스팅
챕터: #6
롬복 인터페이스 때문에 너저분하지만,
생성자가 빈 주입을 위한 주요 테크닉으로 소개되었으므로, 이번 챕터까지만 롬복 인터페이스를 표기한다.
의존성의 방향이 잘 보인다: 레이어드 아키텍처에 맞추어 유저 단부터 DB 단으로 메시지가 흐른다. 코드를 짜보면서 레이어 별로 책임이 명확히 식별되어 편하다고 느꼈다.
사용되는 어노테이션들이 꽤 많으나, 그림으로 사용처와 함께 표시하니 용례를 외우기 어렵지 않았다.
챕터: #12
스프링 시큐리티의 클래스들을 가져다가 OAuth2 설정 및 유저 로그인 서비스를 구현해 보면서
파악한 의존관계를 나타내 보았다.
WebSecurityConfigureAdapter
+ @EnableWebSecurity
를 구현하여 서버 보안을 설정함.WebSecurityConfigureAdapter.configure()
메서드에서 HttpSecurity
에 대해 설정을 주면 된다.httpSecurity.oauth2Login().userInfoEndpoint().userService(customOAuth2UserService)
처럼 명시한다.attributes
해시 테이블에서도 추가하여 관리해야 한다. DefaultOAuth2User
생성자는 attributes
해시 테이블, 유저 롤 그리고 유저 이름 접근키를 요구하고 있다.return new DefaultOAuth2User(
Collections.singleton(new SimpleGrantedAuthority(user.getRoleKey())),
attributes.getAttributes(),
attributes.getNameAttributeKey());
DefaultOAuth2UserService
에 위임하여 기본적인 DefaultOAuth2User
정보를 얻자. 여기서 획득한 attributes
를 확장하되, 필요한 OAuth2 제공자의 식별자와 유저 이름 접근키는 로그인 요청 OAuth2UserRequest
를 분석하여 얻으면 된다.
UserRepository
를 사용해 로그인한 유저 정보를 저장한다.
HttpSession
의 user
속성으로 SessionUser
객체를 지정한다.동일이슈: jojoldu/freelec-springboot2-webservice#78 (comment)
챕터: #2
[이슈 내용]
롬복 기능 테스트 실패
[이슈 원인]
Gradle 버전이 높아서 생기는 호환 문제
챕터: #12
[명세서]
75페이지 밖에 안 되니 다 읽어보셈.
[마감 기한]
6월 13일
챕터: #6
[이슈 내용]
/h2-console 에서 jdbc:h2:mem:testdb 데이터 베이스 찾을 수 없다고 함
챕터: #12
[이슈 내용]
Application 실행 시, ClientRegistrationRepository
빈 주입을 받을 수 없다고 함.
***************************
APPLICATION FAILED TO START
***************************
Description:
Method springSecurityFilterChain in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a bean of type 'org.springframework.security.oauth2.client.registration.ClientRegistrationRepository' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.security.oauth2.client.registration.ClientRegistrationRepository' in your configuration.
> Task :Application.main() FAILED
Execution failed for task ':Application.main()'.
> Process 'command 'C:/Program Files/Java/jdk-13.0.2/bin/java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[이슈 원인]
의심: .gitignore에 의해 application-oauth.properties
가 지금 컴퓨터에 없기 때문에?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.