본문 바로가기

전체 글

Spring + Resilience4j + Redis Cache, LocalCache 사용 Docker 다중 Redis 적용도 해볼겸 redis1, redis2로 처리. version: '3.1' services: mysql: image: mysql:8.0.27 command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci container_name: kotlin-spring-boot-study_db0 ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: root TZ: "Asia/Seoul" volumes: - mysql_data:/var/lib/mysql networks: - esnet mem_reservation: 1g redis1: container_name: ko.. 더보기
JPA - @ElementCollection의 'in' 조건 아래와 같은 Entity가 있다고 생각하자 @Entity @Table(name = "item") @..... class Item( id: Long? = null, attributes: Set ) : AuditingEntity() { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Long? = id @ElementCollection @Enumerated(EnumType.STRING) @CollectionTable(name = "attribute", joinColumns = [JoinColumn(name = "item_id")]) @Column(nullable = false, name = "attribute", columnDefinition.. 더보기
Kotlin - Preconditions.kt 둘러보기 코드 작성시 만들어서 사용하기는 하지만, 공통으로 있으면 좋을 만한~~~ 것들이 있다. https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Preconditions.kt GitHub - JetBrains/kotlin: The Kotlin Programming Language. The Kotlin Programming Language. . Contribute to JetBrains/kotlin development by creating an account on GitHub. github.com Spring Assert를 간혹 사용하기는 했는데 코틀린도 포함되어 있으니 사용하는 것으로 한다. Null Check 예제.. 더보기
WIN 10 Docker CPU/Memory Limit 걸기 1. WSL 2 Based Engine 체크 확인 및 윈도우10 빌드 버전 Build 19041 확인 2. docker desktop 중지(QUIT) 3. Windows 키 -> Windows PowerShell 4. > wsl --shutdown 5. > notepad "$env:USERPROFILE/.wslconfig" 6. 설정 7. docker desktop 실행 및 각 컨테이너 실행 예제 : localstack, mysql, redis 실행시 memory=2GB의 경우 Vmmem은 2.042MB정도 memory=4GB의 경우 Vmmem은 2.766MB정도 memory=8GB의 경우 Vmmem은 2.866MB정도 잘 조정해서 사용하자. 더보기
기사 : hibernate-reactive 주말에 함 둘러보기 https://in.relation.to/2021/10/27/hibernate-reactive-1/ Hibernate Reactive 1.0.0.Final is now available - In Relation To Hibernate Reactive 1.0.0.Final is the first production-ready release of Hibernate Reactive, the only object-relational mapping solution that supports non-blocking database drivers and a reactive style of interaction with the database. Hibernate Reactive no in.relati.. 더보기