โข
Entity
โฆ
@Setter ์ฌ์ฉ ๊ธ์ง
โฆ
์์ฑ์๋์ @Builder์ฐ๊ธฐ
โฆ
table๋ช
์ TB_๋๋ฉ์ธ๋ช
โข
Dto
โฆ
1api ๋น 1 dto(๋ฉ์๋ ๋ณ๋ก ๊ตฌ๋ถ)
โฆ
request, response ๋ก ํจํค์ง ๋๋๊ธฐ
โฆ
ํด๋์ค๋ช
์ Req,Res๋ก ๊ตฌ๋ถ
โฆ
record ์ฌ์ฉํด๋ณด๊ธฐ
โข
Service
โฆ
Servcie๋ฅผ ์ฃผ์
๋ฐ์์ ์ฌ์ฉํ์ง์๊ณ Repository ์ฃผ์
๋ฐ์์ ์ฌ์ฉ
โฆ
ServiceImpl? - ์ฌ์ฉ์ด์ ๊ฐ ์์ง ์๋ฟ์ง๊ฐ ์์์ ๋ณด๋ฅ
โฆ
class์ @Transactional์ ๊ฑธ๊ณ get์ ํ ๋๋ @Transactional(readOnly = true)์ฌ์ฉ
โข
global
โฆ
GoogleStyle์ ์ฉ
โฆ
.ymlํ์ผ ์ฐ๊ธฐ + ํ๊ฒฝ๋ณ์์ ์ฉํ๊ธฐ
โข
๋ค์ด๋ฐ ๋ช
๋ช
๋ฒ
โฆ
์ฃผ์ ๊ณตํตํจ์ (CRUD๊ด๋ จ)ํจ์๋ช
์ ๊ธฐ๋ฅ + ๋๋ฉ์ธ + (List)
โช
๊ธฐ๋ฅ (Create Update Delete Get) + ๋๋ฉ์ธ(Product,User, etcโฆ) + (์ฌ๋ฌ๊ฐ์กฐํ๋ฉด List) + (๋ค์ ๋ด์ฉ์ด ๋ ๋ถ๋๊ฑด ์์ )
โฆ
๋ณ์๋ ๋ฉ์๋๋ CamelCase๋ก
โฆ
ํด๋์ค๋ช
์ PascalCase๋ก
โฆ
repository ์์ findById()ํ๋ ๋ฉ์๋๋ find + Domain์ด๋ฆ ํํ๋ก ๋ช
๋ช
ํด์ค๋ค.
โช
์) findUser(userId) , findProduct(productId)
โข
exception
โฆ
์๋ฌ์ฝ๋๋ ๊ฐ ๋๋ฉ์ธ์์ ๊ด๋ฆฌ (global์์ errorcode๋ ์ธํฐํ์ด์ค๋ก ์ ์ธ)
โฆ
์๋ฌ์ฝ๋ ํด๋์ค ์ด๋ฆ์ ๋๋ฉ์ธ + ErrorCode
โฆ
RuntimeException ์์๋ฐ๋ GlobalException์ ์ธ ํ ๊ฐ ๋๋ฉ์ธ์์ GlobalException ์์๋ฐ๋ ์์ธ ๋ฐ๋ก ๋ง๋ค์ด์ฃผ๊ธฐ(์๋ฌ์ฝ๋์ ๋ง๋ ๋ฉ์๋๋ช
์ผ๋ก ์ค์ )
โข
๋๋ ํ ๋ฆฌ๊ตฌ์กฐ
โฆ
domain
โช
admin (/api/v1/admin)
โข
controller
โข
service
โช
user
โข
controller
โข
service
โข
repository
โข
entity
โข
dto
โข
exception
โช
product
โช
๋ฑ๋ฑ..
โฆ
global


