์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: 85838b8) > git clone https://github.com/lcalmsky/jpa > git checkout 85838b8 Warning: ์ต์ข ์ปค๋ฐ ๊ธฐ์ค์ผ๋ก ์์ฑ๋์ด ์์ด ๋ชจ๋ ํ ์คํธ ๊ฒฐ๊ณผ๋ฅผ ์ ํํ ํ์ธํ ์ ์์ผ๋ ์ฐธ๊ณ ๋ถํ๋๋ฆฝ๋๋ค. Overview ์ฆ์ ๋ก๋ฉ(EAGER)๊ณผ ์ง์ฐ ๋ก๋ฉ(LAZY)์ ๋ํด ์์๋ด ๋๋ค. ์ง์ฐ ๋ก๋ฉ(Lazy Loading) Unit๋ฅผ ์กฐํํ๋ฉด์ Factory์ ์ ๋ณด๊ฐ ํ์ํ์ง ์์ ๋ ๊ตณ์ด Factory๋ฅผ ๊ฐ์ด ์กฐํํ ํ์๊ฐ ์์ต๋๋ค. ๊ทธ๋ด ๋ ์ง์ฐ ๋ก๋ฉ์ ์ฌ์ฉํฉ๋๋ค. ์ฌ์ฉ๋ฒ์ ๊ฐ๋จํฉ๋๋ค. ๋งคํ๊ด๊ณ๋ฅผ ์ง์ ํ ์ ๋ํ ์ด์ ์ fetch ์์ฑ์ FetchType.LAZY๋ก ์ค์ ํ์๋ฉด ๋ฉ๋๋ค. package com.t..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2: Input: nums = [0,3,7,2,5,8,4,6,0,1] Outp..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. Return the minimum number of candies you need to have ..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: 85838b8) > git clone https://github.com/lcalmsky/jpa > git checkout 85838b8 Warning: ์ต์ข ์ปค๋ฐ ๊ธฐ์ค์ผ๋ก ์์ฑ๋์ด ์์ด ๋ชจ๋ ํ ์คํธ ๊ฒฐ๊ณผ๋ฅผ ์ ํํ ํ์ธํ ์ ์์ผ๋ ์ฐธ๊ณ ๋ถํ๋๋ฆฝ๋๋ค. Overview ์ฆ์ ๋ก๋ฉ(EAGER)๊ณผ ์ง์ฐ ๋ก๋ฉ(LAZY)์ ๋ํด ์์๋ด ๋๋ค. ์ง์ฐ ๋ก๋ฉ(Lazy Loading) Unit๋ฅผ ์กฐํํ๋ฉด์ Factory์ ์ ๋ณด๊ฐ ํ์ํ์ง ์์ ๋ ๊ตณ์ด Factory๋ฅผ ๊ฐ์ด ์กฐํํ ํ์๊ฐ ์์ต๋๋ค. ๊ทธ๋ด ๋ ์ง์ฐ ๋ก๋ฉ์ ์ฌ์ฉํฉ๋๋ค. ์ฌ์ฉ๋ฒ์ ๊ฐ๋จํฉ๋๋ค. ๋งคํ๊ด๊ณ๋ฅผ ์ง์ ํ ์ ๋ํ ์ด์ ์ fetch ์์ฑ์ FetchType.LAZY๋ก ์ค์ ํ์๋ฉด ๋ฉ๋๋ค. package com.t..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: ba15d2d) > git clone https://github.com/lcalmsky/jpa > git checkout ba15d2d Warning: ์ต์ข ์ปค๋ฐ ๊ธฐ์ค์ผ๋ก ์์ฑ๋์ด ์์ด ๋ชจ๋ ํ ์คํธ ๊ฒฐ๊ณผ๋ฅผ ์ ํํ ํ์ธํ ์ ์์ผ๋ ์ฐธ๊ณ ๋ถํ๋๋ฆฝ๋๋ค. Overview ๊ฐ์ฒด๊ฐ ์์์ ์ด์ฉํ์ง๋ง ์ค์ ๋ก๋ Entity๋ Table๊ณผ ๊ด๊ณ๊ฐ ์ ํ ์์ ๋ ์ฌ์ฉํ๋ @MappedSuperclass์ ๋ํด ์์๋ด ๋๋ค. @MappedSuperclass ๊ฐ์ฒด์์ ๊ณตํต ์์ฑ์ ์ถ์ ๊ฐ์ฒด๋ก ์ด๋์ํค๊ณ ์์ ๊ฐ์ฒด๋ค์ด ํด๋น ์์ฑ์ ๊ณตํต์ผ๋ก ์ฌ์ฉํ๋ ๊ฒ์ ๋งค์ฐ ํํ ์ผ์ ๋๋ค. ์ด์ ํฌ์คํ ์์๋ Entity ๊ฐ ๊ด๊ณ(์ํผํ์ , ์๋ธํ์ )๋ ์ค์ํ์๋๋ฐ์, ์ฌ๊ธฐ์ ๋ค๋ฃฐ ๋ด์ฉ์ E..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: c93b796) > git clone https://github.com/lcalmsky/jpa > git checkout c93b796 Warning: ์ด๋ฒ ์์ค ์ฝ๋๋ ์ต์ข ์ปค๋ฐ ๊ธฐ์ค์ผ๋ก ์์ฑ๋์ด ์์ด ๋ชจ๋ ํ ์คํธ ๊ฒฐ๊ณผ๋ฅผ ์ ํํ ํ์ธํ ์ ์์ผ๋ ์ฐธ๊ณ ๋ถํ๋๋ฆฝ๋๋ค. Overview ๊ฐ์ฒด์ ์์๊ด๊ณ๋ฅผ ํ ์ด๋ธ๋ก ์ด๋ป๊ฒ ํํํ ์ ์๋์ง ์์๋ด ๋๋ค. ์ํผํ์ , ์๋ธํ์ ๊ด๊ณ ๊ด๊ณํ ๋ฐ์ดํฐ๋ฒ ์ด์ค์๋ ์์ ๊ด๊ณ๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค. ๋ฐ๋ฉด ๊ฐ์ฒด๋ ์์๊ด๊ณ๋ฅผ ๋ํ๋ผ ์ ์๋๋ฐ์, ์ด ์์๊ณผ ์ ์ฌํ ๋ฐฉ๋ฒ์ด DB ๋ชจ๋ธ๋ง ๊ธฐ๋ฒ์๋ ์กด์ฌํฉ๋๋ค. ๋ฐ๋ก ์ํผํ์ , ์๋ธํ์ ๊ด๊ณ์ธ๋ฐ ํ์ฅ๋ ER ๋ชจ๋ธ์ด๋ผ๊ณ ๋ถ๋ฆ ๋๋ค. ์ํผ-์๋ธ ํ์ ์ด ๋์ถ๋๋ ๊ณผ์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. ๊ณตํต๋..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: 6695e56) > git clone https://github.com/lcalmsky/jpa > git checkout 6695e56 Overview ๋ค์ํ ์ฐ๊ด๊ด๊ณ์ ๋ํด ์์๋ด ๋๋ค. ์ฐ๊ด๊ด๊ณ ๋งคํ์ ๊ณ ๋ คํด์ผํ ์ฌํญ์ด 3๊ฐ์ง๊ฐ ์์ต๋๋ค. ๋ฐฉํฅ(๋จ๋ฐฉํฅ, ์๋ฐฉํฅ) ์ฐ๊ด๊ด๊ณ์ ์ฃผ์ธ ๋ค์ค์ฑ ์ด์ค ๋ ๊ฐ์ง๋ ์ด๋ฏธ ์ด์ ํฌ์คํ ์์ ์ดํด๋ณด์์ผ๋ฏ๋ก ๋ค์ค์ฑ์ ๋ํด ์์๋ณด๊ฒ ์ต๋๋ค. ๋ค์ค์ฑ ์ฌ์ค ๋ค์ค์ฑ๋ ์ด์ ํฌ์คํ ์์ ๋ค๋ฃจ๊ธดํ์ง๋ง ๋ค์ ํ๋ฒ ๊ฐ๋ ์ ์ ๋ฆฌํด๋ณด๊ฒ ์ต๋๋ค. DB ๊ด์ ์์์ ๋ค์ค์ฑ์ ๋งํฉ๋๋ค. JPA๋ ๊ฐ์ฒด๋ฅผ ํ ์ด๋ธ์ ๋งคํํ๊ธฐ ์ํด ๋ค์ํ ์ ๋ํ ์ด์ ์ ์ฌ์ฉํ๋๋ฐ ์ด ์ค ๋ค์ค์ฑ์ ํด๋นํ๋ ์ ๋ํ ์ด์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. @ManyToOne: ๋ค๋์ผ @OneToM..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. (commit hash: 0bacabb) > git clone https://github.com/lcalmsky/jpa > git checkout 0bacabb Overview ์ฐ๊ด๊ด๊ณ ๋งคํ ์์ ๋ฅผ ๊ตฌํํฉ๋๋ค. ํ ์ด๋ธ ๊ตฌ์กฐ ๊ฐ์ฒด ๊ตฌ์กฐ ๊ตฌํ ํ ์ด๋ธ ๊ตฌ์กฐ์์ ํ์ธํ๋ค์ํผ FK๋ฅผ ๊ฐ์ง๋ ํ ์ด๋ธ์ orders, order_item ๋ ๊ฐ์ง์ด๊ณ , ๊ฐ์ฒด ๊ธฐ์ค์ผ๋ก๋ Order, OrderItem์ด ์ฐ๊ด๊ด๊ณ์ ์ฃผ์ธ์ด ๋ฉ๋๋ค. ๋ฐ๋ผ์ Order๊ฐ Member๋ฅผ @ManyToOne์ผ๋ก ๊ฐ์ง๊ณ , @JoinColumn(name = "member_id")์ ์ฌ์ฉํด join ํ ์ ์์ต๋๋ค. OrderItem์ด Order๋ฅผ @ManyToOne์ผ๋ก ๊ฐ์ง๊ณ , @JoinColumn(name = "order..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move, you can increment or decrement an element of the array by 1. Test cases are designed so that the answer will fit in a 32-bit integer. Example 1: Input: nums = [1,2,3] Output: 2 Explanation: Only two moves are needed (remember each ..
์์ค ์ฝ๋๋ ์ฌ๊ธฐ ์์ต๋๋ค. ๋ฌธ์ ๋ ์ฌ๊ธฐ ์์ต๋๋ค. Problem You are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order). Each people[i] = [hi, ki] represents the ith person of height hi with exactly ki other people in front who have a height greater than or equal to hi. Reconstruct and return the queue that is represented by the input array people. The return..
- Total
- 181,998
- Today
- 35
- Yesterday
- 551
- Spring Data JPA
- JSON
- ํจ๊ป ์๋ผ๊ธฐ ํ๊ธฐ
- ์คํ๋ง ๋ถํธ ์ ํ๋ฆฌ์ผ์ด์
- ์คํ๋ง ๋ถํธ ํํ ๋ฆฌ์ผ
- leetcode
- spring boot jwt
- @ManyToOne
- spring boot app
- ํจ๊ป ์๋ผ๊ธฐ
- ํด๋ฆฐ ์ํคํ ์ฒ
- Jackson
- ์คํ๋ง๋ถํธ
- Spring Boot
- ์คํ๋ง ๋ถํธ ํ์ ๊ฐ์
- JPA
- spring boot application
- Spring Boot JPA
- Spring Boot Tutorial
- gRPC
- ์๊ณ ๋ฆฌ์ฆ
- intellij
- ์คํ๋ง ๋ฐ์ดํฐ jpa
- ์คํ๋ง ๋ถํธ
- Java
- r
- ํฅ์ฌ๊ณ ๋ ์ํคํ ์ฒ
- proto3
- Linux
- QueryDSL