소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given the head of a singly linked list, return true if it is a palindrome. Example 1: Input: head = [1,2,2,1] Output: true Example 2: Input: head = [1,2] Output: false Constraints: The number of nodes in the list is in the range [1, 10^5]. 0 test(ListNode.of(1, 2, 2, 1), true) ); } private void test(ListNode given, boolean expected) { // when Solution palindr..
스프링 부트 2.6 버전 이상부터 Querydsl 5.0을 기본으로 지원하게 되면서 몇 가지 주의해야할 사항들이 있습니다. PageableExecutionUtils 패키지 변경 먼저 PageableExecutionUtils의 패키지 위치가 변경되었습니다. 기존 위치는 org.springframework.data.repository.support.PageableExecutionUtils였는데 org.springframework.data.support.PageableExecutionUtils로 변경되었습니다. 기존에 사용하고 있었다고 하면 import를 다시 해주셔야 합니다. Querydsl fetchResults(), fetchCount() Deprecated Querydsl의 fetchCount()와 f..
스프링 부트 2.6 미만은 이전 글을 참고해주세요. [Querydsl] 프로젝트 설정 및 테스트 모든 소스 코드는 여기 있습니다. Querydsl 을 사용하기 위해 프로젝트 설정부터 차근차근 달려봅시다! 먼저 자바 버전은 11 , 스프링 버전은 2.5.2 를 선택하였고 gradle 프로젝트로 생성하여 아래 네 jaime-note.tistory.com 최근에 스프링 부트 프로젝트를 생성하여 이전 글 처럼 querydsl을 설정하다보면 정상 동작하지 않습니다. 따라서 build.gradle 파일을 아래 처럼 변경해주어야 합니다. buildscript { ext { queryDslVersion = "5.0.0" } } plugins { id 'org.springframework.boot' version '2...
다형성을 사용할 때 자식 또는 구현체의 객체가 어떤 타입인지 알아보는 방법은 익히 알려져있습니다. 다음과 같은 두 개의 클래스가 있을 때, class Shape { // 생략 } class Triangle extends Shape { // 생략 } Triangle 객체가 어떤 타입인지 알아보려면 아래처럼 확인할 수 있습니다. class Scratch { public static void main(String[] args) { Triangle triangle = new Triangle(); System.out.println(triangle.getClass()); System.out.println(triangle instanceof Shape); System.out.println(triangle instan..
Overview 개인정보 보호 등을 위해 컬럼을 암호화하는 경우가 있습니다. JPA 사용이 너무나도 당연해진 요즘, 암호화 필드를 검색하기 위해서는 where절에 평문을 비교해야 할까요? 아니면 암호화 된 값을 비교해야 할까요? 뭔가 당연히 이거 겠지! 싶었던 건데 막상 답을 하려니 헷갈리시죠? 확인하기 위해 테스트를 해보았습니다. AES256 등의 알고리즘을 이용해 개인을 특정할 수 있는 항목을 암호화하게 되는데, salt를 사용하면 암호가 계속 바뀌게 되기 때문에 검색이 어려워집니다. 따라서 여기서는 고정된 IV를 사용해 암호화를 하더라도 항상 같은 값을 이용하도록 설정하였습니다. Implementation 앞서 언급했듯이 JPA를 이용해야하기 때문에 spring boot 프로젝트를 생성하였습니다. ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem A car travels from a starting position to a destination which is target miles east of the starting position. There are gas stations along the way. The gas stations are represented as an array stations where stations[i] = [positioni, fueli] indicates that the ith gas station is positioni miles east of the starting position and has fueli liters of gas. The car ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of the set so that at least half of the integers of the array are removed. Example 1: Input: arr = [3,3,3,3,5,5,5,2,2,7] Output: 2 Explanation: Choosing {3,7} will make the new array [5,5,5,2,2] which has ..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: 'a' maps to ".-", 'b' maps to "-...", 'c' maps to "-.-.", and so on. For convenience, the full table for the 26 letters of the English alphabet is given below: [".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. Example 1: Input: s = "leetcode" Output: 0 Example 2: Input: s = "loveleetcode" Output: 2 Example 3: Input: s = "aabb" Output: -1 Constraints: 1 test("loveleetcode", 2), () -> test("aabb", -1) ); } private void test(String given, int expected)..
이 포스팅은 프로그래머의 뇌를 읽고 작성하였습니다. 정보가 두뇌로 들어오면 STM에 도달하기 전에 감각 기억 공간이라는 영역을 통과합니다. 감각 기억 공간은 컴퓨터에 비유하면 입력장치와 통신하는 입출력 버퍼라고 볼 수 있습니다. 주변 장치로부터 전송된 정보가 입출력 버퍼에 잠시 저장되는 것처럼 감각 공간에도 마찬가지로 시각, 청각, 촉각에 의한 정보가 잠시 저장됩니다. 그리고 각 감각에 대해 각자의 임시 저장공간이 존재합니다. 이 중 프로그래밍과 관련된 감각은 영상 기억 공간입니다. 영상 기억 공간 코드를 읽을 때 눈을 통해 정보가 들어오고 이 정보는 영상 기억 공간에 잠시 저장됩니다. 영상 기억 공간을 간단히 설명하면 어두운 곳에서 폭죽을 흔들면 그 잔상이 남아 글씨를 쓸 수 있는데 이 때 사용되는 기..
- Total
- 224,073
- Today
- 0
- Yesterday
- 349
- spring boot app
- gRPC
- @ManyToOne
- spring boot application
- 알고리즘
- 클린 아키텍처
- Jackson
- 헥사고날 아키텍처
- 스프링 부트 회원 가입
- Spring Boot
- 스프링 부트
- leetcode
- r
- 함께 자라기
- 스프링부트
- 스프링 부트 튜토리얼
- proto3
- 스프링 부트 애플리케이션
- Spring Data JPA
- spring boot jwt
- Spring Boot JPA
- Linux
- Java
- intellij
- 스프링 데이터 jpa
- JSON
- Spring Boot Tutorial
- JPA
- QueryDSL
- 함께 자라기 후기