Skip to content

Commit

Permalink
create spring-boot-3 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Lurkars committed Oct 26, 2023
1 parent 93eed3a commit 53a3246
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 330 deletions.
24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,26 @@ config/
hs_err*.log
application.properties
ghs.sqlite
gloomhavensecretariat
gloomhavensecretariat

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# System files
.DS_Store
Thumbs.db
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<revision>0.79.5</revision>
<java.version>17</java.version>
<revision>0.80.0</revision>
</properties>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.8</version>
<version>3.1.5</version>
<relativePath />
</parent>

Expand All @@ -37,7 +37,6 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.43.2.1</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ protected ResponseEntity<Object> handleResponseEntityStatusException(ResponseSta

JsonObject errorResponse = new JsonObject();
errorResponse.addProperty("timestamp", Instant.now().toString());
errorResponse.addProperty("status", exception.getStatus().value());
errorResponse.addProperty("error", exception.getStatus().getReasonPhrase());
errorResponse.addProperty("status", exception.getStatusCode().value());
// errorResponse.addProperty("error", exception.getStatus().getReasonPhrase());
if (StringUtils.hasText(exception.getReason())) {
errorResponse.addProperty("reason", exception.getReason());
}

return handleExceptionInternal(exception, gson.toJson(errorResponse), headers, exception.getStatus(), request);
return handleExceptionInternal(exception, gson.toJson(errorResponse), headers, exception.getStatusCode(),
request);
}

}
Loading

0 comments on commit 53a3246

Please sign in to comment.