mirror of
https://github.com/won-ktds/smarketing-backend.git
synced 2026-01-21 11:06:23 +00:00
error fix
This commit is contained in:
parent
38af15a3fd
commit
9182933fe6
@ -37,7 +37,10 @@ subprojects {
|
||||
implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3'
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
runtimeOnly 'com.mysql:mysql-connector-j'
|
||||
|
||||
// PostgreSQL (운영용)
|
||||
runtimeOnly 'org.postgresql:postgresql:42.7.1'
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation 'org.springframework.security:spring-security-test'
|
||||
}
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
package com.won.smarketing.member.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
/**
|
||||
* Redis 설정 클래스
|
||||
* Redis 연결 및 RedisTemplate 설정
|
||||
*/
|
||||
@Configuration
|
||||
public class RedisConfig {
|
||||
|
||||
@Value("${spring.data.redis.host}")
|
||||
private String redisHost;
|
||||
|
||||
@Value("${spring.data.redis.port}")
|
||||
private int redisPort;
|
||||
|
||||
/**
|
||||
* Redis 연결 팩토리 설정
|
||||
*
|
||||
* @return RedisConnectionFactory
|
||||
*/
|
||||
@Bean
|
||||
public RedisConnectionFactory redisConnectionFactory() {
|
||||
return new LettuceConnectionFactory(redisHost, redisPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* RedisTemplate 설정
|
||||
*
|
||||
* @return RedisTemplate<String, String>
|
||||
*/
|
||||
@Bean
|
||||
public RedisTemplate<String, String> redisTemplate() {
|
||||
RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
|
||||
redisTemplate.setConnectionFactory(redisConnectionFactory());
|
||||
|
||||
// 직렬화 설정
|
||||
redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setValueSerializer(new StringRedisSerializer());
|
||||
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setHashValueSerializer(new StringRedisSerializer());
|
||||
|
||||
return redisTemplate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,17 +5,17 @@ spring:
|
||||
application:
|
||||
name: member-service
|
||||
datasource:
|
||||
url: ${DB_URL:jdbc:mysql://localhost:3306/smarketing_member}
|
||||
username: ${DB_USERNAME:root}
|
||||
password: ${DB_PASSWORD:password}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:postgresql://${POSTGRES_HOST:localhost}:${POSTGRES_PORT:5432}/${POSTGRES_DB:MemberDB}
|
||||
username: ${POSTGRES_USER:postgres}
|
||||
password: ${POSTGRES_PASSWORD:postgres}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: ${DDL_AUTO:update}
|
||||
show-sql: ${SHOW_SQL:true}
|
||||
properties:
|
||||
hibernate:
|
||||
dialect: org.hibernate.dialect.MySQLDialect
|
||||
dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||
format_sql: true
|
||||
data:
|
||||
redis:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user