-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1096 from bounswe/main
deploying last changes
- Loading branch information
Showing
69 changed files
with
3,706 additions
and
351 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM eclipse-temurin:17-jdk-alpine | ||
WORKDIR /app | ||
VOLUME /app/images | ||
COPY target/*.jar /app/bounswe.jar | ||
FROM maven:3.9.6-eclipse-temurin-21-jammy | ||
WORKDIR /app/annotation | ||
COPY . /app/annotation | ||
RUN mvn clean install | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java","-jar","/app/bounswe.jar"] | ||
ENTRYPOINT ["java","-jar","/app/annotation/target/annotation-1.0-SNAPSHOT.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
34 changes: 34 additions & 0 deletions
34
...tation/annotation/src/main/java/com/app/annotation/controller/CustomExceptionHandler.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,34 @@ | ||
package com.app.annotation.controller; | ||
|
||
import com.app.annotation.exception.BadRequestException; | ||
import com.app.annotation.exception.ResourceNotFoundException; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.MethodArgumentNotValidException; | ||
import org.springframework.web.bind.annotation.ControllerAdvice; | ||
import org.springframework.web.bind.annotation.ExceptionHandler; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
|
||
@ControllerAdvice | ||
public class CustomExceptionHandler { | ||
@ExceptionHandler(ResourceNotFoundException.class) | ||
@ResponseStatus(HttpStatus.BAD_REQUEST) | ||
public ResponseEntity<Object> handleResourceNotFoundException(ResourceNotFoundException ex) { | ||
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(ex.getMessage()); | ||
} | ||
|
||
@ExceptionHandler(BadRequestException.class) | ||
@ResponseStatus(HttpStatus.BAD_REQUEST) | ||
public ResponseEntity<Object> handleBadRequestException(BadRequestException ex) { | ||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ex.getMessage()); | ||
} | ||
|
||
@ExceptionHandler(MethodArgumentNotValidException.class) | ||
@ResponseStatus(HttpStatus.BAD_REQUEST) | ||
public ResponseEntity<String> handleValidationException(MethodArgumentNotValidException ex) { | ||
String defaultMessage = ex.getBindingResult() | ||
.getFieldError() | ||
.getDefaultMessage(); | ||
return ResponseEntity.badRequest().body(defaultMessage); | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...annotation/annotation/src/main/java/com/app/annotation/exception/BadRequestException.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,7 @@ | ||
package com.app.annotation.exception; | ||
|
||
public class BadRequestException extends RuntimeException { | ||
public BadRequestException(String message) { | ||
super(message); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...tion/annotation/src/main/java/com/app/annotation/exception/ResourceNotFoundException.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,7 @@ | ||
package com.app.annotation.exception; | ||
|
||
public class ResourceNotFoundException extends RuntimeException { | ||
public ResourceNotFoundException(String message) { | ||
super(message); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
app/annotation/annotation/src/main/java/com/app/annotation/model/FragmentSelector.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,27 @@ | ||
package com.app.annotation.model; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
public class FragmentSelector extends Selector { | ||
|
||
private String value; | ||
|
||
private String conformsTo; | ||
|
||
@Override | ||
public Map<String, Object> toJSON() { | ||
Map<String, Object> json = new HashMap<>(); | ||
if (this.type != null) json.put("type", this.type); | ||
if (this.value != null) json.put("value", this.value); | ||
if (this.conformsTo != null) json.put("conformsTo", this.conformsTo); | ||
return json; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
target | ||
images | ||
README.md | ||
format.sh | ||
.gitignore |
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 |
---|---|---|
|
@@ -36,4 +36,5 @@ build/ | |
*.env | ||
|
||
### Image Files | ||
/images/ | ||
images/* | ||
!images/README.md |
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,6 +1,7 @@ | ||
FROM eclipse-temurin:17-jdk-alpine | ||
WORKDIR /app | ||
VOLUME /app/images | ||
COPY target/*.jar /app/bounswe.jar | ||
FROM maven:3.9.6-eclipse-temurin-21-jammy | ||
WORKDIR /app/backend | ||
VOLUME /app/backend/images | ||
COPY . /app/backend/ | ||
RUN mvn clean install | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java","-jar","/app/bounswe.jar"] | ||
ENTRYPOINT ["java","-jar","/app/backend/target/gamereview-0.0.1-SNAPSHOT.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is where the application stores its images, when it is run locally. |
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.