1. build.gradle compile "org.springframework.data:spring-data-redis:1.8.23.RELEASE" compile "redis.clients:jedis:2.9.3" 2. 빈 설정 추가 3. Controller.java 사용 예제 import org.springframework.data.redis.core.RedisTemplate; @Autowired private RedisTemplate redisTemplate; // 데이터 저장 HashMap dateMap = new HashMap(); dateMap.put("email", "aaa@abc.co.kr"); dateMap.put("mobile", "12341234"); redisTemplate.opsFo..
1. Redis 설치 yum install redis 2. Redis 시작 및 재부팅 시 시작 설정 systemctl start redis systemctl enable redis 3. 잘되는지 확인 redis-cli ping >> PONG 4. Redis 설정 vi /etc/redis.conf # 기존 설정값 주석처리 #bind 127.0.0.1 # 로컬호스트만 접속 가능 -> 모든 호스트에서 접속 가능하도록 수정 bind 0.0.0.0 # port 수정 port 1234 # 비밀번호 설정 requirepass password1234 5. 서비스 재시작 systemctl restart redis 6. 레디스 외부에서 접속 가능하게 설정이 잘 되었는지 확인 netstat -nlpt | grep 1234 ..