일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Spring
- 자바스크립트
- 코틀린 클래스
- javascript
- springboot
- oauth2
- Leetcode
- 스프링부트
- 파이게임
- 스프링시큐리티
- pygame
- 프로그래머스
- python
- 스프링
- SQL 문제풀이
- java8
- 스프링부트 채팅서버
- SQL
- 오라클
- mysql
- spring boot
- 자바8
- SQL프로그래머스
- oracle
- js
- 구글로그인
- kotlin 클래스
- LeetCode SQL
- MSA
- 자바 스트림
- Today
- Total
목록Spring (5)
웅겹살의 프로그래밍 삼매경

@Valid 어노테이션으로 파라미터 검증하기 따로 dependency해 줄 필요가 없었지만 지금은 dependency 해줘야 작동하는듯하다.. valid 라이브러리 받는 곳 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation 나는 2.4.4 버전을 사용한다. org.springframework.boot spring-boot-starter-validation 2.4.4 implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.4.4' javax.validation이 제공하는..

oauth2 구글, 페이스북, 네이버 적용완료 자세한 내용은 추후 작성하고 주요작업파일 기록한다 1. application.yml 2. PrincipalOauth2UserService 3. FacebookUserInfo 4. GoogleUserInfo 5. NaverUserInfo 6. Oauth2UserInfo 7. SecurityConfig

카카오로그인 작업중 oauth2로 추후 변경예정 구글 페이스북 등등 다해버리자 RestAPI같은 방식으로 회사에서 많이해서그런지 익숙하다 역시 RestTemplate 사용하는 방식이 편하다 카카오로그인 토큰요청까지 작업함 필요한 내용 주석달았음 카카오에서 제공하는 로그인버튼 넣었더니 간지작살난다 @GetMapping("/auth/kakao/callback") public @ResponseBody String kakaoCallback(String code){ // POST방식으로 key=value 데이터 요청(카카오쪽으로 찌른다) RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.ad..

회원수정 DB, 세션 둘다 수정되는 로직 기록한다 필요한 내용 주석으로 달아둠 OAUTH2 작업중으로 수정예정 1. UserApiContoller @PutMapping("/user") public ResponseDto update(@RequestBody User user){ userService.update(user); // 여기서는 트랜잭션이 종료되기 때문에 DB값은 변경이 됐음 // 하지만 세션값은 변경되지 않은 상태이기때문에 세션값 갱신이 필요함 // 세션 등록 Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(user.getUsername(), user.ge..

스프링부트 + JPA + 스프링시큐리티 프로젝트 진행중 시큐리티 관련내용 기록용으로 글 작성한다 OAUTH2 작업중으로 추가예정 설명 필요한부분 주석달아둠 1. SecurityConfig package com.leo.blog.config; import com.leo.blog.config.auth.PrincipalDetailService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.secur..