feat : 인그레스 적용을 위한 스웨거 주소 수정

This commit is contained in:
lsh9672 2025-06-13 21:57:28 +09:00
parent 55c5845772
commit ea25b5a502
11 changed files with 829 additions and 792 deletions

View File

@ -1,51 +1,51 @@
package com.ktds.hi.analytics.infra.config; package com.ktds.hi.analytics.infra.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.SecurityFilterChain;
import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.CorsConfigurationSource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
* Analytics 서비스 보안 설정 클래스 * Analytics 서비스 보안 설정 클래스
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정 * 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@RequiredArgsConstructor @RequiredArgsConstructor
public class SecurityConfig { public class SecurityConfig {
private final CorsConfigurationSource corsConfigurationSource; private final CorsConfigurationSource corsConfigurationSource;
@Bean @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http http
.csrf(AbstractHttpConfigurer::disable) .csrf(AbstractHttpConfigurer::disable)
.cors(cors -> cors.configurationSource(corsConfigurationSource)) .cors(cors -> cors.configurationSource(corsConfigurationSource))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth .authorizeHttpRequests(auth -> auth
// Swagger 관련 경로 모두 허용 // Swagger 관련 경로 모두 허용
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll() .requestMatchers("/docs/analytics/swagger-ui.html","/docs/analytics/swagger-ui/**").permitAll()
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll() .requestMatchers("/docs/analytics/api-docs/**").permitAll()
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll() .requestMatchers("/docs/analytics/swagger-resources/**", "/webjars/**").permitAll()
// Analytics API 모두 허용 (테스트용) // Analytics API 모두 허용 (테스트용)
.requestMatchers("/api/analytics/**").permitAll() .requestMatchers("/api/analytics/**").permitAll()
.requestMatchers("/api/action-plans/**").permitAll() .requestMatchers("/api/action-plans/**").permitAll()
// Actuator 엔드포인트 허용 // Actuator 엔드포인트 허용
.requestMatchers("/actuator/**").permitAll() .requestMatchers("/actuator/**").permitAll()
// 기타 모든 요청 허용 (테스트용) // 기타 모든 요청 허용 (테스트용)
.anyRequest().permitAll() .anyRequest().permitAll()
); );
return http.build(); return http.build();
} }
} }

View File

@ -1,95 +1,97 @@
server: server:
port: ${ANALYTICS_SERVICE_PORT:8084} port: ${ANALYTICS_SERVICE_PORT:8084}
logging: logging:
level: level:
org.springframework.web.servlet.resource.ResourceHttpRequestHandler: ERROR org.springframework.web.servlet.resource.ResourceHttpRequestHandler: ERROR
org.springframework.web.servlet.DispatcherServlet: WARN org.springframework.web.servlet.DispatcherServlet: WARN
spring: spring:
application: application:
name: analytics-service name: analytics-service
datasource: datasource:
url: ${ANALYTICS_DB_URL:jdbc:postgresql://20.249.162.125:5432/hiorder_analytics} url: ${ANALYTICS_DB_URL:jdbc:postgresql://20.249.162.125:5432/hiorder_analytics}
username: ${ANALYTICS_DB_USERNAME:hiorder_user} username: ${ANALYTICS_DB_USERNAME:hiorder_user}
password: ${ANALYTICS_DB_PASSWORD:hiorder_pass} password: ${ANALYTICS_DB_PASSWORD:hiorder_pass}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_DDL_AUTO:update} ddl-auto: ${JPA_DDL_AUTO:update}
show-sql: ${JPA_SHOW_SQL:false} show-sql: ${JPA_SHOW_SQL:false}
properties: properties:
hibernate: hibernate:
format_sql: true format_sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
data: data:
redis: redis:
host: ${REDIS_HOST:localhost} host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:} password: ${REDIS_PASSWORD:}
ai-api: ai-api:
openai: openai:
api-key: ${OPENAI_API_KEY:} api-key: ${OPENAI_API_KEY:}
base-url: https://api.openai.com/v1 base-url: https://api.openai.com/v1
model: gpt-4o-mini model: gpt-4o-mini
claude: claude:
api-key: ${CLAUDE_API_KEY:} api-key: ${CLAUDE_API_KEY:}
base-url: https://api.anthropic.com base-url: https://api.anthropic.com
model: claude-3-sonnet-20240229 model: claude-3-sonnet-20240229
#external-api: #external-api:
# openai: # openai:
# api-key: ${OPENAI_API_KEY:} # api-key: ${OPENAI_API_KEY:}
# base-url: https://api.openai.com # base-url: https://api.openai.com
# claude: # claude:
# api-key: ${CLAUDE_API_KEY:} # api-key: ${CLAUDE_API_KEY:}
# base-url: https://api.anthropic.com # base-url: https://api.anthropic.com
# 외부 서비스 설정 # 외부 서비스 설정
external: external:
services: services:
review: ${EXTERNAL_SERVICES_REVIEW:http://localhost:8082} review: ${EXTERNAL_SERVICES_REVIEW:http://localhost:8082}
store: ${EXTERNAL_SERVICES_STORE:http://localhost:8081} store: ${EXTERNAL_SERVICES_STORE:http://localhost:8081}
member: ${EXTERNAL_SERVICES_MEMBER:http://localhost:8080} member: ${EXTERNAL_SERVICES_MEMBER:http://localhost:8080}
#springdoc: #springdoc:
# api-docs: # api-docs:
# path: /api-docs # path: /api-docs
# swagger-ui: # swagger-ui:
# path: /swagger-ui.html # path: /swagger-ui.html
springdoc: springdoc:
swagger-ui: swagger-ui:
enabled: true enabled: true
path: /swagger-ui.html path: /docs/analytics/swagger-ui.html
try-it-out-enabled: true try-it-out-enabled: true
api-docs:
management: path: /docs/analytics/api-docs
endpoints:
web: management:
exposure: endpoints:
include: health,info,metrics web:
exposure:
# AI 서비스 설정 include: health,info,metrics
ai:
azure: # AI 서비스 설정
cognitive: ai:
endpoint: ${AI_AZURE_COGNITIVE_ENDPOINT:https://your-cognitive-service.cognitiveservices.azure.com} azure:
key: ${AI_AZURE_COGNITIVE_KEY:your-cognitive-service-key} cognitive:
openai: endpoint: ${AI_AZURE_COGNITIVE_ENDPOINT:https://your-cognitive-service.cognitiveservices.azure.com}
api-key: ${AI_OPENAI_API_KEY:your-openai-api-key} key: ${AI_AZURE_COGNITIVE_KEY:your-cognitive-service-key}
openai:
# Azure Event Hub 설정 api-key: ${AI_OPENAI_API_KEY:your-openai-api-key}
azure:
eventhub: # Azure Event Hub 설정
connection-string: ${AZURE_EVENTHUB_CONNECTION_STRING:Endpoint=sb://your-eventhub.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key} azure:
consumer-group: ${AZURE_EVENTHUB_CONSUMER_GROUP:analytics-consumer} eventhub:
event-hubs: connection-string: ${AZURE_EVENTHUB_CONNECTION_STRING:Endpoint=sb://your-eventhub.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key}
review-events: ${AZURE_EVENTHUB_REVIEW_EVENTS:review-events} consumer-group: ${AZURE_EVENTHUB_CONSUMER_GROUP:analytics-consumer}
ai-analysis-events: ${AZURE_EVENTHUB_AI_ANALYSIS_EVENTS:ai-analysis-events} event-hubs:
storage: review-events: ${AZURE_EVENTHUB_REVIEW_EVENTS:review-events}
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=yourstorageaccount;AccountKey=your-storage-key;EndpointSuffix=core.windows.net} ai-analysis-events: ${AZURE_EVENTHUB_AI_ANALYSIS_EVENTS:ai-analysis-events}
container-name: ${AZURE_STORAGE_CONTAINER_NAME:eventhub-checkpoints} storage:
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=yourstorageaccount;AccountKey=your-storage-key;EndpointSuffix=core.windows.net}
container-name: ${AZURE_STORAGE_CONTAINER_NAME:eventhub-checkpoints}

View File

@ -1,121 +1,122 @@
package com.ktds.hi.member.config; package com.ktds.hi.member.config;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.ktds.hi.common.security.JwtTokenProvider; import com.ktds.hi.common.security.JwtTokenProvider;
import com.ktds.hi.common.security.JwtAuthenticationFilter; import com.ktds.hi.common.security.JwtAuthenticationFilter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint; import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration; import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.CorsConfigurationSource;
/** /**
* Spring Security 설정 클래스 * Spring Security 설정 클래스
* JWT 기반 인증 권한 관리 설정 * JWT 기반 인증 권한 관리 설정
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@RequiredArgsConstructor @RequiredArgsConstructor
public class SecurityConfig { public class SecurityConfig {
private final JwtTokenProvider jwtTokenProvider; private final JwtTokenProvider jwtTokenProvider;
private final CorsConfigurationSource corsConfigurationSource; private final CorsConfigurationSource corsConfigurationSource;
/** /**
* 보안 필터 체인 설정 * 보안 필터 체인 설정
* JWT 인증 방식을 사용하고 세션은 무상태로 관리 * JWT 인증 방식을 사용하고 세션은 무상태로 관리
*/ */
@Bean @Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http http
.csrf(csrf -> csrf.disable()) .csrf(csrf -> csrf.disable())
.cors(cors -> cors.configurationSource(corsConfigurationSource)) .cors(cors -> cors.configurationSource(corsConfigurationSource))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(authz -> authz .authorizeHttpRequests(authz -> authz
.requestMatchers("/api/auth/**", "/api/members/register", "/api/auth/login").permitAll() .requestMatchers("/api/auth/find-username","/api/auth/find-password", "/api/auth/sms/send", "/api/auth/sms/verify").permitAll()
.requestMatchers("/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**").permitAll() .requestMatchers("/api/members/register", "/api/auth/login").permitAll()
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll() .requestMatchers("/docs/member/swagger-ui.html", "/docs/member/swagger-ui/**", "/docs/member/api-docs/**").permitAll()
.requestMatchers("/actuator/**").permitAll() .requestMatchers("/docs/member/swagger-resources/**", "/webjars/**").permitAll()
.anyRequest().authenticated() .requestMatchers("/actuator/**").permitAll()
) .anyRequest().authenticated()
.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class); )
.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
return http.build();
} return http.build();
}
/**
* JWT 인증 필터 /**
*/ * JWT 인증 필터
@Bean */
public JwtAuthenticationFilter jwtAuthenticationFilter() { @Bean
return new JwtAuthenticationFilter(jwtTokenProvider,new ObjectMapper()); public JwtAuthenticationFilter jwtAuthenticationFilter() {
} return new JwtAuthenticationFilter(jwtTokenProvider,new ObjectMapper());
}
/**
* 비밀번호 암호화 /**
*/ * 비밀번호 암호화
@Bean */
public PasswordEncoder passwordEncoder() { @Bean
return new BCryptPasswordEncoder(); public PasswordEncoder passwordEncoder() {
} return new BCryptPasswordEncoder();
}
/**
* 인증 매니저 /**
*/ * 인증 매니저
@Bean */
public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception { @Bean
return config.getAuthenticationManager(); public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception {
} return config.getAuthenticationManager();
}
// @Qualifier("memberJwtTokenProvider")
// private final JwtTokenProvider jwtTokenProvider; // @Qualifier("memberJwtTokenProvider")
// private final AuthService authService; // private final JwtTokenProvider jwtTokenProvider;
// // private final AuthService authService;
// /** //
// * 보안 필터 체인 설정 // /**
// * JWT 인증 방식을 사용하고 세션은 무상태로 관리 // * 보안 필터 체인 설정
// */ // * JWT 인증 방식을 사용하고 세션은 무상태로 관리
// @Bean // */
// public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { // @Bean
// http // public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
// .csrf(csrf -> csrf.disable()) // http
// .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) // .csrf(csrf -> csrf.disable())
// .authorizeHttpRequests(authz -> authz // .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
// .requestMatchers("/api/auth/**", "/api/members/register").permitAll() // .authorizeHttpRequests(authz -> authz
// .requestMatchers("/swagger-ui/**", "/api-docs/**").permitAll() // .requestMatchers("/api/auth/**", "/api/members/register").permitAll()
// .requestMatchers("/actuator/**").permitAll() // .requestMatchers("/swagger-ui/**", "/api-docs/**").permitAll()
// .anyRequest().authenticated() // .requestMatchers("/actuator/**").permitAll()
// ) // .anyRequest().authenticated()
// .addFilterBefore(new JwtAuthenticationFilter(jwtTokenProvider, authService), // )
// UsernamePasswordAuthenticationFilter.class); // .addFilterBefore(new JwtAuthenticationFilter(jwtTokenProvider, authService),
// // UsernamePasswordAuthenticationFilter.class);
// return http.build(); //
// } // return http.build();
// // }
// /** //
// * 비밀번호 암호화 // /**
// */ // * 비밀번호 암호화
// @Bean // */
// public PasswordEncoder passwordEncoder() { // @Bean
// return new BCryptPasswordEncoder(); // public PasswordEncoder passwordEncoder() {
// } // return new BCryptPasswordEncoder();
// // }
// /** //
// * 인증 매니저 // /**
// */ // * 인증 매니저
// @Bean // */
// public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception { // @Bean
// return config.getAuthenticationManager(); // public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception {
// } // return config.getAuthenticationManager();
} // }
}

View File

@ -1,56 +1,58 @@
server: server:
port: ${MEMBER_SERVICE_PORT:8081} port: ${MEMBER_SERVICE_PORT:8081}
spring: spring:
application: application:
name: member-service name: member-service
datasource: datasource:
url: ${MEMBER_DB_URL:jdbc:postgresql://20.249.152.184:5432/hiorder_member} url: ${MEMBER_DB_URL:jdbc:postgresql://20.249.152.184:5432/hiorder_member}
username: ${MEMBER_DB_USERNAME:hiorder_user} username: ${MEMBER_DB_USERNAME:hiorder_user}
password: ${MEMBER_DB_PASSWORD:hiorder_pass} password: ${MEMBER_DB_PASSWORD:hiorder_pass}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_DDL_AUTO:update} ddl-auto: ${JPA_DDL_AUTO:update}
show-sql: ${JPA_SHOW_SQL:false} show-sql: ${JPA_SHOW_SQL:false}
properties: properties:
hibernate: hibernate:
format_sql: true format_sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
data: data:
redis: redis:
host: ${REDIS_HOST:localhost} host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:} password: ${REDIS_PASSWORD:}
timeout: 2000ms timeout: 2000ms
lettuce: lettuce:
pool: pool:
max-active: 8 max-active: 8
max-wait: -1ms max-wait: -1ms
max-idle: 8 max-idle: 8
min-idle: 0 min-idle: 0
jwt: jwt:
secret: ${JWT_SECRET:hiorder-secret-key-for-jwt-token-generation-must-be-long-enough} secret: ${JWT_SECRET:hiorder-secret-key-for-jwt-token-generation-must-be-long-enough}
access-token-expiration: ${JWT_ACCESS_EXPIRATION:3600000} # 1시간 access-token-expiration: ${JWT_ACCESS_EXPIRATION:3600000} # 1시간
refresh-token-expiration: ${JWT_REFRESH_EXPIRATION:604800000} # 7일 refresh-token-expiration: ${JWT_REFRESH_EXPIRATION:604800000} # 7일
sms: sms:
api-key: ${SMS_API_KEY:} api-key: ${SMS_API_KEY:}
api-secret: ${SMS_API_SECRET:} api-secret: ${SMS_API_SECRET:}
from-number: ${SMS_FROM_NUMBER:} from-number: ${SMS_FROM_NUMBER:}
springdoc: springdoc:
swagger-ui: swagger-ui:
enabled: true enabled: true
path: /swagger-ui.html path: /docs/member/swagger-ui.html
try-it-out-enabled: true try-it-out-enabled: true
api-docs:
management: path: /docs/member/api-docs
endpoints:
web: management:
exposure: endpoints:
include: health,info,metrics web:
exposure:
include: health,info,metrics

View File

@ -1,52 +1,52 @@
package com.ktds.hi.recommend.infra.config; package com.ktds.hi.recommend.infra.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.SecurityFilterChain;
import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.CorsConfigurationSource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
* Analytics 서비스 보안 설정 클래스 * Analytics 서비스 보안 설정 클래스
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정 * 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@RequiredArgsConstructor @RequiredArgsConstructor
public class SecurityConfig { public class SecurityConfig {
private final CorsConfigurationSource corsConfigurationSource; private final CorsConfigurationSource corsConfigurationSource;
@Bean @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http http
.csrf(AbstractHttpConfigurer::disable) .csrf(AbstractHttpConfigurer::disable)
.cors(cors -> cors.configurationSource(corsConfigurationSource)) .cors(cors -> cors.configurationSource(corsConfigurationSource))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth .authorizeHttpRequests(auth -> auth
// Swagger 관련 경로 모두 허용 // Swagger 관련 경로 모두 허용
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll() .requestMatchers("/docs/recommend/swagger-ui.html","/docs/recommend/swagger-ui/**").permitAll()
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll() .requestMatchers("/docs/recommend/api-docs/**").permitAll()
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll() .requestMatchers("/docs/recommend/swagger-resources/**", "/webjars/**").permitAll()
// Analytics API 모두 허용 (테스트용) // Recommend API 모두 허용 (테스트용)
.requestMatchers("/api/analytics/**").permitAll() .requestMatchers("/api/recommend/**").permitAll()
.requestMatchers("/api/action-plans/**").permitAll()
// Actuator 엔드포인트 허용 // Actuator 엔드포인트 허용
.requestMatchers("/actuator/**").permitAll() .requestMatchers("/actuator/**").permitAll()
// 기타 모든 요청 허용 (테스트용) // 기타 모든 요청 허용 (테스트용)
.anyRequest().permitAll() .anyRequest().permitAll()
); );
return http.build(); return http.build();
} }
} }

View File

@ -1,228 +1,226 @@
# recommend/src/main/resources/application.yml # recommend/src/main/resources/application.yml
server: server:
port: ${RECOMMEND_SERVICE_PORT:8085} port: ${RECOMMEND_SERVICE_PORT:8085}
spring: spring:
cloud: cloud:
compatibility-verifier: compatibility-verifier:
enabled: false enabled: false
application: application:
name: recommend-service name: recommend-service
# 프로필 설정 # 프로필 설정
profiles: profiles:
active: ${SPRING_PROFILES_ACTIVE:local} active: ${SPRING_PROFILES_ACTIVE:local}
# 데이터베이스 설정 # 데이터베이스 설정
datasource: datasource:
url: ${RECOMMEND_DB_URL:jdbc:postgresql://20.249.162.245:5432/hiorder_recommend} url: ${RECOMMEND_DB_URL:jdbc:postgresql://20.249.162.245:5432/hiorder_recommend}
username: ${RECOMMEND_DB_USERNAME:hiorder_user} username: ${RECOMMEND_DB_USERNAME:hiorder_user}
password: ${RECOMMEND_DB_PASSWORD:hiorder_pass} password: ${RECOMMEND_DB_PASSWORD:hiorder_pass}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
hikari: hikari:
maximum-pool-size: ${DB_POOL_SIZE:20} maximum-pool-size: ${DB_POOL_SIZE:20}
minimum-idle: ${DB_POOL_MIN_IDLE:5} minimum-idle: ${DB_POOL_MIN_IDLE:5}
connection-timeout: ${DB_CONNECTION_TIMEOUT:30000} connection-timeout: ${DB_CONNECTION_TIMEOUT:30000}
idle-timeout: ${DB_IDLE_TIMEOUT:600000} idle-timeout: ${DB_IDLE_TIMEOUT:600000}
max-lifetime: ${DB_MAX_LIFETIME:1800000} max-lifetime: ${DB_MAX_LIFETIME:1800000}
pool-name: RecommendHikariCP pool-name: RecommendHikariCP
# JPA 설정 # JPA 설정
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_DDL_AUTO:update} ddl-auto: ${JPA_DDL_AUTO:update}
show-sql: ${JPA_SHOW_SQL:false} show-sql: ${JPA_SHOW_SQL:false}
properties: properties:
hibernate: hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: ${JPA_FORMAT_SQL:true} format_sql: ${JPA_FORMAT_SQL:true}
show_sql: ${JPA_SHOW_SQL:false} show_sql: ${JPA_SHOW_SQL:false}
use_sql_comments: ${JPA_USE_SQL_COMMENTS:true} use_sql_comments: ${JPA_USE_SQL_COMMENTS:true}
jdbc: jdbc:
batch_size: 20 batch_size: 20
order_inserts: true order_inserts: true
order_updates: true order_updates: true
open-in-view: false open-in-view: false
# Redis 설정 (올바른 구조)
data:
# Redis 설정 (올바른 구조) redis:
data: host: ${REDIS_HOST:localhost}
redis: port: ${REDIS_PORT:6379}
host: ${REDIS_HOST:localhost} password: ${REDIS_PASSWORD:}
port: ${REDIS_PORT:6379} timeout: 2000ms
password: ${REDIS_PASSWORD:} database: ${REDIS_DATABASE:0}
timeout: 2000ms lettuce:
database: ${REDIS_DATABASE:0} pool:
lettuce: max-active: ${REDIS_POOL_MAX_ACTIVE:8}
pool: max-idle: ${REDIS_POOL_MAX_IDLE:8}
max-active: ${REDIS_POOL_MAX_ACTIVE:8} min-idle: ${REDIS_POOL_MIN_IDLE:2}
max-idle: ${REDIS_POOL_MAX_IDLE:8} max-wait: -1ms
min-idle: ${REDIS_POOL_MIN_IDLE:2} shutdown-timeout: 100ms
max-wait: -1ms
shutdown-timeout: 100ms # 외부 서비스 URL 설정
services:
# 외부 서비스 URL 설정 store:
services: url: ${STORE_SERVICE_URL:http://store-service:8082}
store: review:
url: ${STORE_SERVICE_URL:http://store-service:8082} url: ${REVIEW_SERVICE_URL:http://review-service:8083}
review: member:
url: ${REVIEW_SERVICE_URL:http://review-service:8083} url: ${MEMBER_SERVICE_URL:http://member-service:8081}
member:
url: ${MEMBER_SERVICE_URL:http://member-service:8081} # Feign 설정
feign:
# Feign 설정 client:
feign: config:
client: default:
config: connectTimeout: 5000
default: readTimeout: 10000
connectTimeout: 5000 loggerLevel: basic
readTimeout: 10000 store-service:
loggerLevel: basic connectTimeout: 3000
store-service: readTimeout: 8000
connectTimeout: 3000 review-service:
readTimeout: 8000 connectTimeout: 3000
review-service: readTimeout: 8000
connectTimeout: 3000 circuitbreaker:
readTimeout: 8000 enabled: true
circuitbreaker: compression:
enabled: true request:
compression: enabled: true
request: response:
enabled: true enabled: true
response:
enabled: true # Circuit Breaker 설정
resilience4j:
# Circuit Breaker 설정 circuitbreaker:
resilience4j: instances:
circuitbreaker: store-service:
instances: failure-rate-threshold: 50
store-service: wait-duration-in-open-state: 30000
failure-rate-threshold: 50 sliding-window-size: 10
wait-duration-in-open-state: 30000 minimum-number-of-calls: 5
sliding-window-size: 10 review-service:
minimum-number-of-calls: 5 failure-rate-threshold: 50
review-service: wait-duration-in-open-state: 30000
failure-rate-threshold: 50 sliding-window-size: 10
wait-duration-in-open-state: 30000 minimum-number-of-calls: 5
sliding-window-size: 10 retry:
minimum-number-of-calls: 5 instances:
retry: store-service:
instances: max-attempts: 3
store-service: wait-duration: 1000
max-attempts: 3 review-service:
wait-duration: 1000 max-attempts: 3
review-service: wait-duration: 1000
max-attempts: 3
wait-duration: 1000
# Actuator 설정
management:
# Actuator 설정 endpoints:
management: web:
endpoints: exposure:
web: include: health,info,metrics,prometheus
exposure: endpoint:
include: health,info,metrics,prometheus health:
endpoint: show-details: always
health: metrics:
show-details: always export:
metrics: prometheus:
export:
prometheus: # Swagger/OpenAPI 설정
springdoc:
# Swagger/OpenAPI 설정 api-docs:
springdoc: path: /docs/recommend/api-docs
api-docs: swagger-ui:
path: /api-docs path: /docs/recommend/swagger-ui.html
swagger-ui: tags-sorter: alpha
path: /swagger-ui.html operations-sorter: alpha
tags-sorter: alpha display-request-duration: true
operations-sorter: alpha display-operation-id: true
display-request-duration: true show-actuator: false
display-operation-id: true
show-actuator: false # 로깅 설정
logging:
# 로깅 설정 level:
logging: root: ${LOG_LEVEL_ROOT:INFO}
level: com.ktds.hi.recommend: ${LOG_LEVEL:INFO}
root: ${LOG_LEVEL_ROOT:INFO} org.springframework.cloud.openfeign: ${LOG_LEVEL_FEIGN:DEBUG}
com.ktds.hi.recommend: ${LOG_LEVEL:INFO} org.springframework.web: ${LOG_LEVEL_WEB:INFO}
org.springframework.cloud.openfeign: ${LOG_LEVEL_FEIGN:DEBUG} org.springframework.data.redis: ${LOG_LEVEL_REDIS:INFO}
org.springframework.web: ${LOG_LEVEL_WEB:INFO} org.hibernate.SQL: ${LOG_LEVEL_SQL:INFO}
org.springframework.data.redis: ${LOG_LEVEL_REDIS:INFO} org.hibernate.type.descriptor.sql.BasicBinder: ${LOG_LEVEL_SQL_PARAM:INFO}
org.hibernate.SQL: ${LOG_LEVEL_SQL:INFO} pattern:
org.hibernate.type.descriptor.sql.BasicBinder: ${LOG_LEVEL_SQL_PARAM:INFO} console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%X{traceId},%X{spanId}] %logger{36} - %msg%n"
pattern: file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%X{traceId},%X{spanId}] %logger{36} - %msg%n"
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%X{traceId},%X{spanId}] %logger{36} - %msg%n" file:
file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%X{traceId},%X{spanId}] %logger{36} - %msg%n" name: ${LOG_FILE_PATH:./logs/recommend-service.log}
file: max-size: 100MB
name: ${LOG_FILE_PATH:./logs/recommend-service.log} max-history: 30
max-size: 100MB
max-history: 30 # Security 설정
security:
# Security 설정 jwt:
security: secret: ${JWT_SECRET:hiorder-recommend-secret-key-2024}
jwt: expiration: ${JWT_EXPIRATION:86400000} # 24시간
secret: ${JWT_SECRET:hiorder-recommend-secret-key-2024} cors:
expiration: ${JWT_EXPIRATION:86400000} # 24시간 allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000,http://localhost:8080}
cors: allowed-methods: GET,POST,PUT,DELETE,OPTIONS
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000,http://localhost:8080} allowed-headers: "*"
allowed-methods: GET,POST,PUT,DELETE,OPTIONS allow-credentials: true
allowed-headers: "*"
allow-credentials: true recommend:
cache:
recommend: recommendation-ttl: ${RECOMMENDATION_CACHE_TTL:1800}
cache: user-preference-ttl: ${USER_PREFERENCE_CACHE_TTL:3600}
recommendation-ttl: ${RECOMMENDATION_CACHE_TTL:1800} algorithm:
user-preference-ttl: ${USER_PREFERENCE_CACHE_TTL:3600} max-recommendations: ${MAX_RECOMMENDATIONS:20}
algorithm: default-radius: ${DEFAULT_SEARCH_RADIUS:5000}
max-recommendations: ${MAX_RECOMMENDATIONS:20} max-radius: ${MAX_SEARCH_RADIUS:10000}
default-radius: ${DEFAULT_SEARCH_RADIUS:5000} ---
max-radius: ${MAX_SEARCH_RADIUS:10000} # Local 환경 설정
--- spring:
# Local 환경 설정 config:
spring: activate:
config: on-profile: local
activate: jpa:
on-profile: local show-sql: true
jpa: hibernate:
show-sql: true ddl-auto: create-drop
hibernate:
ddl-auto: create-drop logging:
level:
logging: com.ktds.hi.recommend: DEBUG
level: org.springframework.web: DEBUG
com.ktds.hi.recommend: DEBUG
org.springframework.web: DEBUG ---
# Development 환경 설정
--- spring:
# Development 환경 설정 config:
spring: activate:
config: on-profile: dev
activate: jpa:
on-profile: dev show-sql: true
jpa: hibernate:
show-sql: true ddl-auto: update
hibernate:
ddl-auto: update logging:
level:
logging: com.ktds.hi.recommend: DEBUG
level:
com.ktds.hi.recommend: DEBUG ---
# Production 환경 설정
--- spring:
# Production 환경 설정 config:
spring: activate:
config: on-profile: prod
activate: jpa:
on-profile: prod show-sql: false
jpa: hibernate:
show-sql: false ddl-auto: validate
hibernate:
ddl-auto: validate logging:
level:
logging: root: WARN
level: com.ktds.hi.recommend: INFO
root: WARN
com.ktds.hi.recommend: INFO
org.springframework.cloud.openfeign: INFO org.springframework.cloud.openfeign: INFO

View File

@ -1,50 +1,49 @@
package com.ktds.hi.review.infra.config; package com.ktds.hi.review.infra.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.SecurityFilterChain;
import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.CorsConfigurationSource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
* Analytics 서비스 보안 설정 클래스 * Analytics 서비스 보안 설정 클래스
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정 * 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@RequiredArgsConstructor @RequiredArgsConstructor
public class SecurityConfig { public class SecurityConfig {
private final CorsConfigurationSource corsConfigurationSource; private final CorsConfigurationSource corsConfigurationSource;
@Bean @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http http
.csrf(AbstractHttpConfigurer::disable) .csrf(AbstractHttpConfigurer::disable)
.cors(cors -> cors.configurationSource(corsConfigurationSource)) .cors(cors -> cors.configurationSource(corsConfigurationSource))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth .authorizeHttpRequests(auth -> auth
// Swagger 관련 경로 모두 허용 // Swagger 관련 경로 모두 허용
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll() .requestMatchers("/docs/review/swagger-ui.html","/docs/review/swagger-ui/**").permitAll()
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll() .requestMatchers("/docs/review/api-docs/**").permitAll()
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll() .requestMatchers("/docs/review/swagger-resources/**", "/webjars/**").permitAll()
// Analytics API 모두 허용 (테스트용) // review API 모두 허용 (테스트용)
.requestMatchers("/api/analytics/**").permitAll() .requestMatchers("/api/reviews/**").permitAll()
.requestMatchers("/api/action-plans/**").permitAll()
// Actuator 엔드포인트 허용
// Actuator 엔드포인트 허용 .requestMatchers("/actuator/**").permitAll()
.requestMatchers("/actuator/**").permitAll()
// 기타 모든 요청 허용 (테스트용)
// 기타 모든 요청 허용 (테스트용) .anyRequest().permitAll()
.anyRequest().permitAll() );
);
return http.build();
return http.build(); }
} }
}

View File

@ -1,42 +1,43 @@
server: server:
port: ${REVIEW_SERVICE_PORT:8083} port: ${REVIEW_SERVICE_PORT:8083}
spring: spring:
application: application:
name: review-service name: review-service
datasource: datasource:
url: ${REVIEW_DB_URL:jdbc:postgresql://20.214.91.15:5432/hiorder_review} url: ${REVIEW_DB_URL:jdbc:postgresql://20.214.91.15:5432/hiorder_review}
username: ${REVIEW_DB_USERNAME:hiorder_user} username: ${REVIEW_DB_USERNAME:hiorder_user}
password: ${REVIEW_DB_PASSWORD:hiorder_pass} password: ${REVIEW_DB_PASSWORD:hiorder_pass}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_DDL_AUTO:update} ddl-auto: ${JPA_DDL_AUTO:update}
show-sql: ${JPA_SHOW_SQL:false} show-sql: ${JPA_SHOW_SQL:false}
properties: properties:
hibernate: hibernate:
format_sql: true format_sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
data: data:
redis: redis:
host: ${REDIS_HOST:localhost} host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:} password: ${REDIS_PASSWORD:}
servlet: servlet:
multipart: multipart:
max-file-size: ${MAX_FILE_SIZE:10MB} max-file-size: ${MAX_FILE_SIZE:10MB}
max-request-size: ${MAX_REQUEST_SIZE:50MB} max-request-size: ${MAX_REQUEST_SIZE:50MB}
file-storage: file-storage:
base-path: ${FILE_STORAGE_PATH:/var/hiorder/uploads} base-path: ${FILE_STORAGE_PATH:/var/hiorder/uploads}
allowed-extensions: jpg,jpeg,png,gif,webp allowed-extensions: jpg,jpeg,png,gif,webp
max-file-size: 10485760 # 10MB max-file-size: 10485760 # 10MB
springdoc: springdoc:
api-docs: api-docs:
path: /api-docs path: /docs/review/api-docs
swagger-ui: swagger-ui:
path: /swagger-ui.html enabled: true
path: /docs/review/swagger-ui.html

View File

@ -1,50 +1,49 @@
package com.ktds.hi.store.config; package com.ktds.hi.store.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.SecurityFilterChain;
import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.CorsConfigurationSource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
* Analytics 서비스 보안 설정 클래스 * Analytics 서비스 보안 설정 클래스
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정 * 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
@RequiredArgsConstructor @RequiredArgsConstructor
public class SecurityConfig { public class SecurityConfig {
private final CorsConfigurationSource corsConfigurationSource; private final CorsConfigurationSource corsConfigurationSource;
@Bean @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http http
.csrf(AbstractHttpConfigurer::disable) .csrf(AbstractHttpConfigurer::disable)
.cors(cors -> cors.configurationSource(corsConfigurationSource)) .cors(cors -> cors.configurationSource(corsConfigurationSource))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth .authorizeHttpRequests(auth -> auth
// Swagger 관련 경로 모두 허용 // Swagger 관련 경로 모두 허용
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll() .requestMatchers("/docs/store/swagger-ui.html","/docs/store/swagger-ui/**").permitAll()
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll() .requestMatchers("/docs/store/api-docs/**").permitAll()
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll() .requestMatchers("/docs/store/swagger-resources/**", "/webjars/**").permitAll()
// Analytics API 모두 허용 (테스트용) // Analytics API 모두 허용 (테스트용)
.requestMatchers("/api/analytics/**").permitAll() .requestMatchers("/api/external/**").permitAll()
.requestMatchers("/api/action-plans/**").permitAll()
// Actuator 엔드포인트 허용
// Actuator 엔드포인트 허용 .requestMatchers("/actuator/**").permitAll()
.requestMatchers("/actuator/**").permitAll()
// 기타 모든 요청 허용 (테스트용)
// 기타 모든 요청 허용 (테스트용) .anyRequest().permitAll()
.anyRequest().permitAll() );
);
return http.build();
return http.build(); }
} }
}

View File

@ -0,0 +1,35 @@
package com.ktds.hi.store.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
@Configuration
public class SwaggerConfig {
@Bean
public OpenAPI openAPI() {
final String securitySchemeName = "Bearer Authentication";
return new OpenAPI()
.addServersItem(new Server().url("/"))
.info(new Info()
.title("하이오더 매장 관리 서비스 API")
.description("매장, 외부연동관련 API")
.version("1.0.0"))
.addSecurityItem(new SecurityRequirement()
.addList(securitySchemeName))
.components(new Components()
.addSecuritySchemes(securitySchemeName, new SecurityScheme()
.name(securitySchemeName)
.type(SecurityScheme.Type.HTTP)
.scheme("bearer")
.bearerFormat("JWT")));
}
}

View File

@ -1,48 +1,48 @@
server: server:
port: ${STORE_SERVICE_PORT:8082} port: ${STORE_SERVICE_PORT:8082}
spring: spring:
application: application:
name: store-service name: store-service
datasource: datasource:
url: ${STORE_DB_URL:jdbc:postgresql://20.249.154.116:5432/hiorder_store} url: ${STORE_DB_URL:jdbc:postgresql://20.249.154.116:5432/hiorder_store}
username: ${STORE_DB_USERNAME:hiorder_user} username: ${STORE_DB_USERNAME:hiorder_user}
password: ${STORE_DB_PASSWORD:hiorder_pass} password: ${STORE_DB_PASSWORD:hiorder_pass}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_DDL_AUTO:update} ddl-auto: ${JPA_DDL_AUTO:update}
show-sql: ${JPA_SHOW_SQL:false} show-sql: ${JPA_SHOW_SQL:false}
properties: properties:
hibernate: hibernate:
format_sql: true format_sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
data: data:
redis: redis:
host: ${REDIS_HOST:localhost} host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379} port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:} password: ${REDIS_PASSWORD:}
external-api: external-api:
naver: naver:
client-id: ${NAVER_CLIENT_ID:} client-id: ${NAVER_CLIENT_ID:}
client-secret: ${NAVER_CLIENT_SECRET:} client-secret: ${NAVER_CLIENT_SECRET:}
base-url: https://openapi.naver.com base-url: https://openapi.naver.com
kakao: kakao:
api-key: ${KAKAO_API_KEY:} api-key: ${KAKAO_API_KEY:}
base-url: https://dapi.kakao.com base-url: https://dapi.kakao.com
google: google:
api-key: ${GOOGLE_API_KEY:} api-key: ${GOOGLE_API_KEY:}
base-url: https://maps.googleapis.com base-url: https://maps.googleapis.com
hiorder: hiorder:
api-key: ${HIORDER_API_KEY:} api-key: ${HIORDER_API_KEY:}
base-url: ${HIORDER_BASE_URL:https://api.hiorder.com} base-url: ${HIORDER_BASE_URL:https://api.hiorder.com}
springdoc: springdoc:
api-docs: api-docs:
path: /api-docs path: /docs/store/api-docs
swagger-ui: swagger-ui:
path: /swagger-ui.html path: /docs/store/swagger-ui.html