Phase 3
-ing
Test Code
Exception
ν΄λ³΄κ³ μΆμλ λλ©μΈ λ‘μ§
@EntityListener(AuditingEntityListener.class)
BaseEntity(abstract class)λ₯Ό μμ±νκ³ , μ΄ extendsνμ¬ createdAt, updatedAt νλμ κ°μ 곡ν΅μΌλ‘ λ€μ΄κ°λ νλλ₯Ό μμ±ν΄μ€λ€.
Sping main λ©μλκ° λ€μ΄μλ νμΌμ @EnableJpaAuditing μ΄λ Έν μ΄μ μ λΆμ¬μΌ
extends κ°μ μλνμ¬ μ§μ ν΄λμ€μ μμ μ΄λ Έν μ΄μ μ λΆμ¬μ£Όμλ€.@EntityListener(AuditingEntityListener.class)λ₯Ό BaseEntity μͺ½μ λΆμ¬μ£Όλ©΄ @EnableJpaAuditing μ΄λ Έν μ΄μ μ λΆμ¬μ£Όμ§ μμλ μ μλνλ€.
μλ° μ§λ ¬ν Serializable
ref
Java Abstraction _ abstract classes and method
Data abstraction is the process of hiding certain details and showing only essential information to the user. Abstraction can be achieved with either abstract classes or interfaces .
βοΈ abstract classes and method
βοΈ Interface
An interface
is a completely "abstract class" that is used to group related methods with empty bodies. To access the interface methods, the interface must be "implemented" (kinda like inherited) by another class with the implements
keyword (instead of extends
). The body of the interface method is provided by the "implement" class .
ref
@SpringBootApplication
ref
@Valid
Test Code
ref
Long -> BoardId λ°Έλ₯ νμ
mapping ν λ λ²κ±°λ‘μμ κ²°κ΅ ν λ² μλνλ€κ°, Long Id λ‘ λ³κ²½νλ€.
Optional
@Builder.Dafult
μ²μμ @DynamicInsert λΆμ΄κ³ @Column(Default= 'μ΄μ©κ΅¬ ') ν΄μ μμ±νλ€.
@DynamicInsert λ...?
ref
final, static, final static
ref
reflection
μ κ·Ό μ νμ μ€μ λ‘ μ¬μ©ν΄λ³΄κΈ°
enum
ref
ResponseEntity
Dependencies
mapstruct
generated ν
Logback + slf4j
lombok
Last updated