Skip to content

Commit

Permalink
Merge branch 'dev' into fe/dev/bug_expiredDate_cal#1404
Browse files Browse the repository at this point in the history
  • Loading branch information
seong-hui authored Nov 17, 2023
2 parents 84e81b4 + 7cd2f2f commit 4ec76c4
Show file tree
Hide file tree
Showing 47 changed files with 2,033 additions and 1,170 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/back-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,8 @@ jobs:
backend-CI:
runs-on: ubuntu-latest
steps:
- name: Make ssh file
run: |
mkdir -p ~/.ssh
echo '${{ secrets.SSH_CONFIG }}' | base64 -d > ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa
- name: 체크아웃
uses: actions/checkout@v3
with:
submodule: true
- name: 서브모듈 업데이트
run: |
git submodule update --init config

- name: JDK 11 설정
uses: actions/setup-java@v3
Expand All @@ -37,6 +27,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle 빌드
run: |
cd backend
Expand Down
1 change: 0 additions & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'

implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64'
implementation 'org.mapstruct:mapstruct:1.5.5.Final'

runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:2.7.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public void issueAccessToken() {
return objectMapper.readTree(response)
.get(ftApiProperties.getAccessTokenName()).asText();
} catch (Exception e) {
log.error(e.getMessage());
log.error("{}", e.getMessage());
throw new RuntimeException();
}
})
.onErrorResume(e -> {
log.error(e.getMessage());
log.error("{}", e.getMessage());
throw new ServiceException(ExceptionStatus.OAUTH_BAD_GATEWAY);
})
.block();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,33 @@
import com.google.firebase.FirebaseOptions;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.nio.file.Paths;
import javax.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class FCMInitializer {

@Value("${firebase.messaging.credentials.path}")
private String credentialsPath;
private final ResourceLoader resourceLoader;

@PostConstruct
public void initialize() throws IOException {
ClassPathResource resource = new ClassPathResource(credentialsPath);

Path currentPath = Paths.get("").toAbsolutePath().normalize();
Resource resource = resourceLoader.getResource("file:" + currentPath + credentialsPath);
try (InputStream inputStream = resource.getInputStream()) {
FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(inputStream))
.build();

if (FirebaseApp.getApps().isEmpty()) {
FirebaseApp.initializeApp(options);
log.info("Firebase application has been initialized");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ private void sendSoonOverdueMessage(String token, String name, Long daysLeftFrom

FirebaseMessaging.getInstance().sendAsync(message);
}
}
}
Loading

0 comments on commit 4ec76c4

Please sign in to comment.