Business layer-create orders/transaction/tearDown()
⭐️ @SpringBootTest 🆚 @JpaDataTest @SpringBootTest 🆚 @WebMvcTest @Transactional(readOnly=true) optimistic lock 🆚 pessimistic lock CQRS: separate Command(CUD) and Query(Read) ✅ Business...
⭐️ @SpringBootTest 🆚 @JpaDataTest @SpringBootTest 🆚 @WebMvcTest @Transactional(readOnly=true) optimistic lock 🆚 pessimistic lock CQRS: separate Command(CUD) and Query(Read) ✅ Business...
✅ Strategy Pattern make a lot of algorithms encapsulate them and make them interchangeable at runtime, 갈아끼우기 client will use the common interface only actual behavior can vary according...
✅ Mediator mediator object control how the objects interact objects communicate through mediator 👎🏻 before: objects communicate directly with each other, tight coupling 👍🏻 after ...
✅ Command Pattern encapsulate the request decouple invoker(호출자) and reciever(수신자) 👍🏻 when request logic changes, invoker code will not change ✅ Diagram 👀 Command pattern example ✔️ In...
⭐️ QueryDSL ✅ Production code @Repository public interface ProductRepository extends JpaRepository<Product, Long> { /** * select * * from product * where selling_sta...
✅ Product Entity @Entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Product extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) pr...
✅ Facade provide a 👍🏻 simplified, unified interface to a 👎🏻 complex subsystem define a high level interface that makes the subsystem easier to use 👎🏻 client interacts with many cl...
✅ use the handler chain to handle request client will only make request to the Interface Handler inside the chain of concrete handlers, it will handle the request 👍🏻 client will n...
✅ Real Object: 사장님, senior Proxy: 비서, junior 쉬운 일, 보안 필요 없는 일은 비서가 처리 Proxy 어려운 일이나 보안이 필요한 일은 사장님은 호출한다Real Object ✅ Types of proxy 1️⃣ Lazy initialization When creating the inst...
✅ Flyweight 👍🏻 memory optimization, efficiency minimize memory usage by sharing common object data if object is same, do not duplicate ❌ 똑같은 object이면 또 만들지 말고(메모리 낭비), 공유하자 What...