Skip to content

Commit

Permalink
Merge pull request #6 from NahianAhmed/adding-redis
Browse files Browse the repository at this point in the history
adding redis
  • Loading branch information
NahianAhmed authored Mar 28, 2022
2 parents 9c82270 + 5a98173 commit d50897e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@
<version>${querydsl.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>${querydsl.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.6.3</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.nahian.github.io.rookiedev.configs;

import org.springframework.context.annotation.Configuration;

@Configuration
public class RedisConfig {
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
Expand All @@ -13,7 +14,9 @@
@AllArgsConstructor
@Table(name = "user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User {
public class User implements Serializable {

private static final long serialVersionUID = -9077082267200414421L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ spring.datasource.username=root
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=update
logging.level.org.hibernate.SQL=debug

spring.cache.type=redis
spring.redis.host=localhost
spring.redis.port=6379

0 comments on commit d50897e

Please sign in to comment.