파란하늘의 지식창고
article thumbnail
PropertyEditor를 사용한 Data Binding (in Spring Data Redis)
Study/Java 2021. 6. 14. 15:26

Spring Data Redis의 문서를 보다 보면 아래와 같은 예제가 보인다. // inject the template as ListOperations @Resource(name="redisTemplate") private ListOperations listOps; Spring Boot의 RedisAutoConfiguration에서는 RedisTemplate과 StringRedisTemplate bean을 자동 설정해주고 있다. @Bean @ConditionalOnMissingBean(name = "redisTemplate") @ConditionalOnSingleCandidate(RedisConnectionFactory.class) public RedisTemplate redisTemplate(Redi..

article thumbnail
Spring Boot Data Redis 사용해보기
Study/Java 2021. 6. 9. 14:48

Spring Boot 기반에서 Redis를 사용하는 방법 Spring Boot 2.5.0 기준으로 작성함 dependency 설정 org.springframework.boot spring-boot-starter-data-redis redis는 connectionFactory로 Lettuce와 Jedis 두 가지를 제공한다. default로 Lettuce를 제공하고 만약 Jedis를 사용하고 싶은 경우 아래처럼 설정하면 된다. org.springframework.boot spring-boot-starter-data-redis io.lettuce lettuce-core redis.clients jedis Bean 설정 Spring Boot의 RedisAutoConfiguration은 RedisTemplate..

redis Data types
Study/ETC 2021. 6. 4. 14:02

아래의 글을 번역하였다. https://redis.io/topics/data-types Data types – Redis *Data types *Strings Strings are the most basic kind of Redis value. Redis Strings are binary safe, this means that a Redis string can contain any kind of data, for instance a JPEG image or a serialized Ruby object. A String value can be at max 512 Megabyt redis.io Strings String은 redis value의 가장 기본적인 종류이다. Redis String은 binary ..

redis commands
Study/ETC 2021. 6. 4. 08:22

redis를 공부하려고 하면서 일단 어떤 것인지 알기 위해 간단한 command 부터 사용해보려고 한다. 접속 우선 로컬에 redis를 설치하고 접속한다. telnet 127.0.0.1 6379 전체 commands https://redis.io/commands Command reference – Redis redis.io redis가 제공하는 기능들을 사용하기 위한 명령어 들이고 group이 ABC 순으로 정렬이 되어 있다. Cluster Connection Geo Hashes HyperLogLog Keys Lists Pub/Sub Scripting Server Sets Sorted Sets Streams Strings Transactions 이 목록으로는 공부할 순서를 유추할 수 없다. 가장 간단한 ..

개인 공부용 Docker Desktop kubernetes 설정 모음
Study/Docker & Kubernetes 2021. 6. 2. 07:52

여러 오픈소스를 공부할 때 Docker Desktop for Windows에서 제공하는 kubernetes를 애용한다. docker container만으로도 충분히 쓸만하지만 계속 container가 초기화되어 데이터가 유지되지 않거나 또는 매번 window 구동 시 container를 일일이 띄우는 게 귀찮거나 하는 잡다한 문제들이 있다. 환경 구성 설정을 관리하여 이런 문제들을 해결해 나갈 수 있지만 container가 많아질 수록 그 container를 계속 유지하는 게 귀찮아지게 된다. 이런 문제를 편하게 해결 할 수 있는 게 kubernetes인데 예전에는 minikube를 사용할 수 있었지만 그것도 설치하는 게 너무 귀찮고 복잡했다. 하지만 요즘은 Window Docker Desktop이 ku..