레디스(2)
-
Jedis - Redis(레디스) 자바 API
작성일 : 2018. 11. 19 JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); JedisPool pool = new JedisPool(jedisPoolConfig, "localhost"); Jedis jedis = pool.getResource(); Map m_value = new HashMap(); m_value.put("summary", "Moderate High"); m_value.put("status", "7444"); m_value.put("mesg_title", "error"); m_value.put("mesg_content", "exception"); jedis.hmset("R20181119333", m_value);//Map 으로 넣..
2023.08.01 -
RedisTemplate - Spring 에서 \xaa 문자 안들어가게 하는 방법
DefaultSerializer 를 치환해서 UTF-8 대신 US-ASCII (US 알파벳과 숫자만으로 깔끔하게) 인코딩으로 변환 : 변경 전 - 현상 : "redisTemplate.setDefaultSerializer(new StringRedisSerializer());" 를 썼을 땐 UTF-8 인코딩 변환에 의해 원치 않는 결과가 들어감. 최종 코드 : @Bean(name = "template") public RedisTemplate redisTemplateConfig(JedisConnectionFactory jedisConnectionFactory) { RedisTemplate redisTemplate = new RedisTemplate(); redisTemplate.setDefaultSeriali..
2023.04.05