Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/backend/push-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,18 @@ dependencies {

// Spring Cloud
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'

// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// Validation
implementation 'org.hibernate.validator:hibernate-validator:8.0.1.Final'

// Dotenv
implementation 'io.github.cdimascio:java-dotenv:5.2.2'

// Protobuf
implementation 'com.google.protobuf:protobuf-java:3.21.12'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
package com.bbebig.push_server;

import io.github.cdimascio.dotenv.Dotenv;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class PushServerApplication {

public static void main(String[] args) {
initEnv();
SpringApplication.run(PushServerApplication.class, args);
}

/**
* 스트링부트 실행 전 시스템 property를 설정한다.
*/
static void initEnv() {
Dotenv.configure()
.directory("./src/main/resources/")
.filename(".env")
.load()
.entries()
.forEach(e -> {
System.setProperty(e.getKey(), e.getValue());
});
}
}
25 changes: 24 additions & 1 deletion src/backend/push-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
spring.application.name=push-server
server:
port: 9060

spring:
application:
name: push-server

eureka:
client:
register-with-eureka: true
fetch-registry: true
service-url:
defaultZone: http://discovery-server:8761/eureka

eas:
passport:
secretKey: ${PASSPORT_SECRET_KEY}
expiration: ${PASSPORT_EXPIRATION}
header: ${PASSPORT_HEADER}
algorithm: ${PASSPORT_ALGORITHM}

auth:
server:
url: ${AUTH_SERVER_URL}