본문 바로가기

전체 글

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.. 더보기
WSL 덕에 윈도 겜 PC에서 개발을 조금~ 아주 조금~ 할 수 있어서 좋네. 리눅스 처럼 사용할 수 있으니 아주 좋군. 더보기
runCatching - kotlin 코틀린 예외처리를 보다가 흠.. 이런게 있구나.. 하고 남김. 특정 클래스에서 숫자형 문자를 반환하고 반환된 문자를 Int형으로 변경하는 상황으로 테스트코드 작성. internal class TextNumber { // 임의 Throw fun getThrow() : String { throw RuntimeException() } // 정상반환 fun getStringNumber() : String = "1000" } 예시: 기본적인 try ~ catch를 사용했을 경우 의 코드 ( 오래전.. ) internal class RunCatchingService { private val log = KotlinLogging.logger { } // throw fun getAsis() : Int { val text.. 더보기