diff --git a/application.yml b/application.yml new file mode 100644 index 0000000..8c829fd --- /dev/null +++ b/application.yml @@ -0,0 +1,43 @@ +# 2시간(7,200,000), 1일(86,400,000) jwt token +token: + expiration_time: 7200000 + refresh_time: 86400000 + secret: '69da8b5bb11e2f5274e775bfc70a267ffd09ceb14dd71eeb4014e15021e62b8cb2ebdea0f02d1849ebbe0368512d0decc10f99fa3709f01c1b55f5e2dfcd8ebd' +#db: +# hostname: 192.168.0.102 +# Password Encoder Configuration +password: + encoder: + salt: "IIPBS!@#$SecureSalt" +eureka: + instance: + instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} # random port 사용시 eureka server에 인스턴스가 각각 표시되지 않는다 + preferIpAddress: true # 서비스간 통신 시 hostname 보다 ip 를 우선 + client: + register-with-eureka: true # eureka 서버에 등록 + fetch-registry: true # 외부 검색 가능 + service-url: + defaultZone: http://admin:admin@${eureka.instance.hostname:localhost}:8761/eureka + +# file attach location - messages{lang}.properties 도 이 경로에 위치한다. +file: + directory: ${app.home:${user.home}}/msa-attach-volume # url 사용시에는 사용되지 않는다 + url: http://${file.hostname:localhost}:8080 # nginx 로 파일 다운로드 처리 +messages: + directory: ${file.directory}/messages + +apigateway: + host: http://${apigateway.hostname:localhost}:${server.port} + +# rabbitmq server +spring: + rabbitmq: + host: ${rabbitmq.hostname:localhost} + port: 5672 + username: guest + password: guest + zipkin: + base-url: http://${zipkin.hostname:localhost}:${zipkin.port:9411} + +egov: + message: hello diff --git a/attach-service-dev.yml b/attach-service-dev.yml new file mode 100644 index 0000000..2627cc9 --- /dev/null +++ b/attach-service-dev.yml @@ -0,0 +1,97 @@ +db: + hostname: 192.168.0.102 + +database: + url: jdbc:postgresql://${db.hostname:localhost}:5432/CS0227?currentSchema=sm_bs_cs + +spring: + datasource: + url: jdbc:postgresql://${db.hostname:localhost}:5432/CS0227?currentSchema=sm_bs_cs + username: msaportal + password: msaportal + driver-class-name: org.postgresql.Driver + hikari: + minimum-idle: 5 # 너무 많은 유휴 연결 방지 + maximum-pool-size: 20 # DB 부하와 병목 최소화 + idle-timeout: 30000 # 30초 후 유휴 연결 제거 + max-lifetime: 1800000 # 30분 후 커넥션 재생성 + connection-timeout: 5000 # 커넥션 요청 타임아웃 (5초) + data-source-properties: + cachePrepStmts: true + prepStmtCacheSize: 512 + prepStmtCacheSqlLimit: 4096 + useServerPrepStmts: true + jpa: + database-platform: org.hibernate.dialect.PostgreSQLDialect + generate-ddl: true + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true + globally_quoted_identifiers: false + default_batch_fetch_size: 1000 + open-in-view: false + show-sql: true + defer-datasource-initialization: true + servlet: + multipart: + enabled: true + max-file-size: -1 + max-request-size: -1 + cloud: + bus: + destination: springCloudBus + stream: + function: + definition: attachmentEntity;hardDeleteEntity;busConsumer # 첨부파일 entity 정보 업데이트 하기 위한 이벤트에 대한 consumer function & springcloudbus consumer function + bindings: + busConsumer-in-0: + destination: ${spring.cloud.bus.destination} + attachmentEntity-in-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트 + destination: attachment-entity.topic # queue name + group: attachment + attachmentEntity-out-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트 + destination: attachment-entity.topic # queue name + group: attachment + hardDeleteEntity-in-0: # 첨부파일 entity 정보 물리 삭제 하기 위한 이벤트 + destination: hard-delete-entity.topic # queue name + group: attachment + sql: + init: + mode: always + platform: postgresql + session: + store-type: redis + redis: + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + username: ${REDIS_USERNAME:} + password: ${REDIS_PASSWORD:egovframe} +# Swagger 설정 +springdoc: + swagger-ui: + path: /swagger-ui.html + groups-order: DESC + operations-sorter: method + disable-swagger-default-url: true + api-docs: + path: /v3/api-docs + show-actuator: true + default-consumes-media-type: application/json + default-produces-media-type: application/json + paths-to-match: /api/** # Actuator 제외하고 문서화할 경로만 포함 +# tus 분할 파일 업로드 관련 path 설정 +tus: + data: + path: /files/tus/temp + expiration: 60000 + save: + path: /files/upload +ffmpeg: +# path: d:/ffmpeg/bin/ffmpeg.exe + path: /usr/bin/ffmpeg #/opt/homebrew/bin/ffmpeg , /usr/bin/ffmpeg +ffprobe: +# path: d:/ffmpeg/bin/ffprobe.exe + path: /usr/bin/ffprobe #/opt/homebrew/bin/ffprobe , /usr/bin/ffprobe diff --git a/attach-service-prod.yml b/attach-service-prod.yml new file mode 100644 index 0000000..2627cc9 --- /dev/null +++ b/attach-service-prod.yml @@ -0,0 +1,97 @@ +db: + hostname: 192.168.0.102 + +database: + url: jdbc:postgresql://${db.hostname:localhost}:5432/CS0227?currentSchema=sm_bs_cs + +spring: + datasource: + url: jdbc:postgresql://${db.hostname:localhost}:5432/CS0227?currentSchema=sm_bs_cs + username: msaportal + password: msaportal + driver-class-name: org.postgresql.Driver + hikari: + minimum-idle: 5 # 너무 많은 유휴 연결 방지 + maximum-pool-size: 20 # DB 부하와 병목 최소화 + idle-timeout: 30000 # 30초 후 유휴 연결 제거 + max-lifetime: 1800000 # 30분 후 커넥션 재생성 + connection-timeout: 5000 # 커넥션 요청 타임아웃 (5초) + data-source-properties: + cachePrepStmts: true + prepStmtCacheSize: 512 + prepStmtCacheSqlLimit: 4096 + useServerPrepStmts: true + jpa: + database-platform: org.hibernate.dialect.PostgreSQLDialect + generate-ddl: true + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true + globally_quoted_identifiers: false + default_batch_fetch_size: 1000 + open-in-view: false + show-sql: true + defer-datasource-initialization: true + servlet: + multipart: + enabled: true + max-file-size: -1 + max-request-size: -1 + cloud: + bus: + destination: springCloudBus + stream: + function: + definition: attachmentEntity;hardDeleteEntity;busConsumer # 첨부파일 entity 정보 업데이트 하기 위한 이벤트에 대한 consumer function & springcloudbus consumer function + bindings: + busConsumer-in-0: + destination: ${spring.cloud.bus.destination} + attachmentEntity-in-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트 + destination: attachment-entity.topic # queue name + group: attachment + attachmentEntity-out-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트 + destination: attachment-entity.topic # queue name + group: attachment + hardDeleteEntity-in-0: # 첨부파일 entity 정보 물리 삭제 하기 위한 이벤트 + destination: hard-delete-entity.topic # queue name + group: attachment + sql: + init: + mode: always + platform: postgresql + session: + store-type: redis + redis: + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + username: ${REDIS_USERNAME:} + password: ${REDIS_PASSWORD:egovframe} +# Swagger 설정 +springdoc: + swagger-ui: + path: /swagger-ui.html + groups-order: DESC + operations-sorter: method + disable-swagger-default-url: true + api-docs: + path: /v3/api-docs + show-actuator: true + default-consumes-media-type: application/json + default-produces-media-type: application/json + paths-to-match: /api/** # Actuator 제외하고 문서화할 경로만 포함 +# tus 분할 파일 업로드 관련 path 설정 +tus: + data: + path: /files/tus/temp + expiration: 60000 + save: + path: /files/upload +ffmpeg: +# path: d:/ffmpeg/bin/ffmpeg.exe + path: /usr/bin/ffmpeg #/opt/homebrew/bin/ffmpeg , /usr/bin/ffmpeg +ffprobe: +# path: d:/ffmpeg/bin/ffprobe.exe + path: /usr/bin/ffprobe #/opt/homebrew/bin/ffprobe , /usr/bin/ffprobe