-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refactor/#317
- Loading branch information
Showing
43 changed files
with
573 additions
and
294 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
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 @@ | ||
[submodule "backend/secrets"] | ||
path = backend/secrets | ||
url = https://github.com/woowacourse-teams/2024-devel-up-secret.git |
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 |
---|---|---|
|
@@ -33,5 +33,8 @@ out/ | |
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### submoduleyml ### | ||
src/main/resources/application*.yml | ||
|
||
### VS Code ### | ||
.vscode/ |
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,9 @@ | ||
FROM openjdk:21 | ||
|
||
ARG JAR_FILE=build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["java", "-Dspring.profiles.active=${SPRING_PROFILE}", \ | ||
"-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
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,30 @@ | ||
services: | ||
nginx: | ||
image: nginx | ||
depends_on: | ||
- application | ||
networks: | ||
- nginx-app-net | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- /home/ubuntu/custom.conf:/etc/nginx/conf.d/default.conf | ||
- /etc/letsencrypt/live/api.devel-up.co.kr/fullchain.pem:/etc/letsencrypt/live/api.devel-up.co.kr/fullchain.pem | ||
- /etc/letsencrypt/live/api.devel-up.co.kr/privkey.pem:/etc/letsencrypt/live/api.devel-up.co.kr/privkey.pem | ||
|
||
application: | ||
image: ${BACKEND_APP_IMAGE_NAME} | ||
networks: | ||
- nginx-app-net | ||
ports: | ||
- "8080:8080" | ||
- "8082:8082" | ||
environment: | ||
TZ: "Asia/Seoul" | ||
SPRING_PROFILE: dev | ||
restart: always | ||
container_name: develup-app | ||
|
||
networks: | ||
nginx-app-net: |
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,30 @@ | ||
package develup.api; | ||
|
||
import java.util.List; | ||
import develup.api.common.ApiResponse; | ||
import develup.application.hashtag.HashTagResponse; | ||
import develup.application.hashtag.HashTagService; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@Tag(name = "해시태그 API") | ||
class HashTagApi { | ||
|
||
private final HashTagService hashTagService; | ||
|
||
public HashTagApi(HashTagService hashTagService) { | ||
this.hashTagService = hashTagService; | ||
} | ||
|
||
@GetMapping("/hash-tags") | ||
@Operation(summary = "해시태그 목록 조회 API", description = "해시태그 목록을 조회합니다.") | ||
public ResponseEntity<ApiResponse<List<HashTagResponse>>> getHashTags() { | ||
List<HashTagResponse> responses = hashTagService.getHashTags(); | ||
|
||
return ResponseEntity.ok(new ApiResponse<>(responses)); | ||
} | ||
} |
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
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
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
21 changes: 21 additions & 0 deletions
21
backend/src/main/java/develup/application/hashtag/HashTagService.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package develup.application.hashtag; | ||
|
||
import java.util.List; | ||
import develup.domain.hashtag.HashTagRepository; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class HashTagService { | ||
|
||
private final HashTagRepository hashTagRepository; | ||
|
||
public HashTagService(HashTagRepository hashTagRepository) { | ||
this.hashTagRepository = hashTagRepository; | ||
} | ||
|
||
public List<HashTagResponse> getHashTags() { | ||
return hashTagRepository.findAll().stream() | ||
.map(HashTagResponse::from) | ||
.toList(); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.