mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 11:26:26 +00:00
distribution-service에 PostgreSQL, Redis 연결 설정 추가
- application.yml에 DB 및 캐시 설정 추가 - IntelliJ 실행 프로파일에 환경 변수 설정 - Kafka 브로커 주소를 실제 서버로 변경
This commit is contained in:
parent
28a7a91ca2
commit
9f50c7feaa
@ -10,8 +10,19 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
</extension>
|
</extension>
|
||||||
<envs>
|
<envs>
|
||||||
<env name="KAFKA_BOOTSTRAP_SERVERS" value="localhost:9092" />
|
<env name="SERVER_PORT" value="8085" />
|
||||||
|
<env name="DB_HOST" value="4.217.133.59" />
|
||||||
|
<env name="DB_PORT" value="5432" />
|
||||||
|
<env name="DB_NAME" value="distributiondb" />
|
||||||
|
<env name="DB_USERNAME" value="eventuser" />
|
||||||
|
<env name="DB_PASSWORD" value="Hi5Jessica!" />
|
||||||
|
<env name="REDIS_HOST" value="20.214.210.71" />
|
||||||
|
<env name="REDIS_PORT" value="6379" />
|
||||||
|
<env name="REDIS_PASSWORD" value="Hi5Jessica!" />
|
||||||
|
<env name="KAFKA_BOOTSTRAP_SERVERS" value="4.230.50.63:9092" />
|
||||||
<env name="KAFKA_CONSUMER_GROUP" value="distribution-service" />
|
<env name="KAFKA_CONSUMER_GROUP" value="distribution-service" />
|
||||||
|
<env name="JPA_DDL_AUTO" value="update" />
|
||||||
|
<env name="JPA_SHOW_SQL" value="false" />
|
||||||
</envs>
|
</envs>
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
|
|||||||
@ -5,12 +5,44 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: distribution-service
|
name: distribution-service
|
||||||
|
|
||||||
# Disable auto-configuration (No database required)
|
# Database Configuration
|
||||||
|
datasource:
|
||||||
|
driver-class-name: org.postgresql.Driver
|
||||||
|
url: jdbc:postgresql://${DB_HOST:4.217.133.59}:${DB_PORT:5432}/${DB_NAME:distributiondb}
|
||||||
|
username: ${DB_USERNAME:eventuser}
|
||||||
|
password: ${DB_PASSWORD:Hi5Jessica!}
|
||||||
|
hikari:
|
||||||
|
maximum-pool-size: 10
|
||||||
|
minimum-idle: 5
|
||||||
|
connection-timeout: 30000
|
||||||
|
idle-timeout: 600000
|
||||||
|
max-lifetime: 1800000
|
||||||
|
|
||||||
|
jpa:
|
||||||
|
hibernate:
|
||||||
|
ddl-auto: ${JPA_DDL_AUTO:update}
|
||||||
|
properties:
|
||||||
|
hibernate:
|
||||||
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
format_sql: true
|
||||||
|
show_sql: ${JPA_SHOW_SQL:false}
|
||||||
|
|
||||||
|
# Redis Configuration
|
||||||
|
data:
|
||||||
|
redis:
|
||||||
|
host: ${REDIS_HOST:20.214.210.71}
|
||||||
|
port: ${REDIS_PORT:6379}
|
||||||
|
password: ${REDIS_PASSWORD:Hi5Jessica!}
|
||||||
|
timeout: 3000ms
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
max-active: 8
|
||||||
|
max-idle: 8
|
||||||
|
min-idle: 2
|
||||||
|
|
||||||
|
# Disable security auto-configuration
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
|
|
||||||
- org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
|
|
||||||
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
|
|
||||||
- org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
- org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
||||||
- org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
|
- org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user