Skip to content

Commit

Permalink
Merge pull request #2 from chobeebee/chobb
Browse files Browse the repository at this point in the history
레디스 config Value값 수정, application-sensitive 연결을 위한 코드 추가
  • Loading branch information
chobeebee authored Jun 25, 2024
2 parents 506effc + 772b5a0 commit 6f1ea48
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {

group = 'com.sparta'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '21'

java {
toolchain {
Expand All @@ -29,16 +28,22 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
runtimeOnly 'com.mysql:mysql-connector-j'
implementation 'mysql:mysql-connector-java:8.0.28'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

implementation 'com.google.firebase:firebase-admin:9.0.0'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

implementation 'org.springframework.boot:spring-boot-starter'
}

tasks.named('test') {
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/com/sparta/binplay/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
@Configuration
@EnableRedisRepositories
public class RedisConfig {
@Value("${spring.redis.host}")
@Value("${spring.data.redis.host}")
private String redisHost;

@Value("${spring.redis.port}")
@Value("${spring.data.redis.port}")
private int redisPort;

@Bean
Expand All @@ -33,10 +33,6 @@ public RedisTemplate<String, Object> redisTemplate() {
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());

// Hash를 사용할 경우 Serializer
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.setHashValueSerializer(new StringRedisSerializer());

return redisTemplate;
}
}
}
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.use_sql_comments=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

spring.profiles.include=sensitive

0 comments on commit 6f1ea48

Please sign in to comment.