-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Ha-dam/feat/13-CICD
feat: create Dockerfile
- Loading branch information
Showing
3 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM openjdk:17 | ||
COPY ./build/libs/hadam-0.0.1-SNAPSHOT.jar app.jar | ||
ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/com/hadam/hadam/repository/DiaryRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package com.hadam.hadam.repository; | ||
|
||
import com.hadam.hadam.domain.Diary; | ||
import com.hadam.hadam.global.error.exception.EntityNotFoundException; | ||
import com.hadam.hadam.global.error.exception.ErrorCode; | ||
import jakarta.persistence.EntityNotFoundException; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface DiaryRepository extends JpaRepository<Diary, Long> { | ||
|
||
default Diary findByIdOrThrow(Long diaryId){ | ||
return findById(diaryId) | ||
.orElseThrow(()-> new EntityNotFoundException(String.valueOf(ErrorCode.ENTITY_NOT_FOUND))); | ||
.orElseThrow(()-> new EntityNotFoundException(ErrorCode.ENTITY_NOT_FOUND)); | ||
} | ||
} |