소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. Example 1: Input: left = 5, right = 7 Output: 4 Example 2: Input: left = 0, right = 0 Output: 0 Example 3: Input: left = 1, right = 2147483647 Output: 0 Constraints: 0 >= 1; move++; } return right test(5, 7, 4), () -> test(..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (branch: feature/8) Overview 회원 가입시 전송한 이메일을 확인하여 회원을 인증하는 절차를 개발합니다. 회원 가입시 다시 서버로 요청할 수 있게 토큰을 포함한 링크를 전송하고 사용자가 해당 링크를 클릭했을 때 토큰이 일치하면 가입 완료 처리합니다. 이메일 인증을 하는 이유는 무작위로 생성하는 이메일 계정을 허용하지 않기 위함이고, 서비스 내에서의 메일 전송 기능을 제대로 활용할 수 없기 때문입니다. 이메일 인증을 대체할 수 있는 방법은 소셜 인증 등이 있습니다. 인증 링크로 접근했을 때 노출될 화면과 인증 로직을 개발해야 합니다. 이메일 인증 개발 입력 값에..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (branch: feature/7) Overview 비밀번호를 평문 그대로 저장하는 서비스는 세상 어디에도 없습니다. 특히 전자금융권과 같이 민감한 개인 정보를 다루는 쪽에서는 망을 분리해여 저장하고 접근하기도 합니다. 마찬가지로 지금 개발하는 서비스에도 비밀번호 인코딩 기능을 추가해줘야 합니다. Implementation 스프링 시큐리티에서 권장하는 방법은 PasswordEncoder를 사용하는 것입니다. 사용 방법은 매우 간단합니다. PasswordEncoder를 빈 등록해주면 되는데 직접 사용할 알고리즘을 구현해도 되고 기본값을 사용해도 됩니다. 기본값을 사용할 경우 BCr..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (branch: feature/6) Overview 지금까지 작성한 코드를 리펙터링합니다. 리펙터링 전에 테스트 코드를 작성하면 리펙터링 이후에도 견고한 테스트 코드를 작성했는지 추가로 확인할 수 있습니다. 테스트 할 것을 정의합니다. 회원 가입시 이상한 값이 입력된 경우 다시 회원 가입 화면으로 리다이렉트 하는지 확인 에러가 잘 노출 되는지 확인 회원 가입시 정상적인 값이 입력된 경우 가입한 회원 데이터가 존재하는지 확인 이메일이 보내지는지 확인 리팩터링시 고려해야할 부분입니다. 메서드의 길이 너무 길면 메서드를 나눔 코드 가독성 코드의 위치 객체들 사이의 의존 관계 클래스의 ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker. Implement the Trie class: Trie() Initializes the trie object. void insert(String word) Inserts the string word into the trie. boo..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. Example 1: Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D"..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (branch: feature/5) Overview 회원 가입 폼을 검증하는 방법과 회원 가입을 처리하는 방법에 대해 공부합니다. 애너테이션을 이용한 검증과 커스텀 검증을 모두 사용하고, 에러가 있을 경우 회원 가입을 처리하지 않습니다. 모든 값이 유효할 회원 정보를 저장하고, 이메일 정보를 발송한 뒤 홈으로 이동하는 과정까지 개발합니다. Prerequisite Dependencies build.gradle의 dependencies에 spring-boot-starter-validation 패키지를 추가합니다. dependencies { // 생략 implementation 'or..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an integer array nums of length n where all the integers of nums are in the range [1, n] and each integer appears once or twice, return an array of all the integers that appears twice. You must write an algorithm that runs in O(n) time and uses only constant extra space. Example 1: Input: nums = [4,3,2,7,8,2,3,1] Output: [2,3] Example 2: Input: nums = [..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Example 1: Input: n = 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 step 2. 2 steps Example 2: Input: n = 3 Output: 3 Explanation: There are three ways to climb to th..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island doesn't have "lakes", meaning the water..
- Total
- Today
- Yesterday
- @ManyToOne
- Jackson
- 스프링 부트
- gRPC
- spring boot application
- JSON
- spring boot app
- JPA
- leetcode
- 스프링 부트 애플리케이션
- Spring Boot
- 함께 자라기
- Spring Boot Tutorial
- Java
- 클린 아키텍처
- 스프링 데이터 jpa
- 스프링부트
- 스프링 부트 튜토리얼
- r
- intellij
- 스프링 부트 회원 가입
- Spring Data JPA
- proto3
- 함께 자라기 후기
- Spring Boot JPA
- 헥사고날 아키텍처
- QueryDSL
- Linux
- spring boot jwt
- 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |