Skip to content

Commit

Permalink
#1 Update jdk, gradle and 3rd party libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tscz committed Jul 17, 2020
1 parent a585bd8 commit 6731fc1
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up JDK 12
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 12
java-version: 14
- name: Build with Gradle
run: ./gradlew build --info
# Manual upload of coverage report, see https://github.com/kt3k/coveralls-gradle-plugin/issues/85
Expand Down
23 changes: 12 additions & 11 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
ext {
versions = [
guava: "28.0-jre",
jjwt: "0.10.7",
postgres: "42.2.6",
problem: "0.23.0",
spring: "5.2.2.RELEASE",
spring_boot: "2.2.2.RELEASE",
guava: "29.0-jre",
jjwt: "0.11.2",
postgres: "42.2.14",
problem: "0.25.2",
spring: "5.2.7.RELEASE",
spring_boot: "2.3.1.RELEASE",
]
testVersions = [
jsonassert: "2.8.0",
h2: "1.4.200",
httpclient: "4.5.10",
httpclient: "4.5.12",
]
pluginVersions = [
asciidoc: "2.3.0",
coveralls: "2.8.4",
jacoco: "0.8.4",
asciidoc: "3.2.0",
coveralls: "2.10.1"
]
libraries = [
guava: "com.google.guava:guava:${versions.guava}",
Expand All @@ -29,6 +28,7 @@ ext {
spring_boot_starter_jpa: "org.springframework.boot:spring-boot-starter-data-jpa",
spring_boot_starter_security: "org.springframework.boot:spring-boot-starter-security",
spring_boot_starter_web: "org.springframework.boot:spring-boot-starter-web",
spring_boot_starter_validation: "org.springframework.boot:spring-boot-starter-validation",
]
testLibraries = [
h2: "com.h2database:h2:${testVersions.h2}",
Expand All @@ -39,7 +39,8 @@ ext {
]
gradlePlugins = [
asciidoc: "org.asciidoctor:asciidoctor-gradle-jvm:${pluginVersions.asciidoc}",
coveralls: "gradle.plugin.com.github.kt3k.coveralls:coveralls-gradle-plugin:${pluginVersions.coveralls}",
asciidoc_pdf: "org.asciidoctor:asciidoctor-gradle-jvm-pdf:${pluginVersions.asciidoc}",
coveralls: "gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:${pluginVersions.coveralls}",
spring_boot: "org.springframework.boot:spring-boot-gradle-plugin:${versions.spring_boot}",
]
}
1 change: 1 addition & 0 deletions gradle/spring-boot-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies {
implementation libraries.spring_boot_starter_jpa
implementation libraries.spring_boot_starter_web
implementation libraries.spring_boot_starter_security
implementation libraries.spring_boot_starter_validation

runtimeOnly libraries.postgres

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.springframework.boot.SpringApplication;

import com.github.tscz.spring.platform.SpringBootPlatformApplication;

@SpringBootPlatformApplication
public class TestApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.test.annotation.DirtiesContext;
import org.zalando.problem.spring.web.advice.validation.ConstraintViolationProblem;
import org.zalando.problem.violations.ConstraintViolationProblem;

import com.github.tscz.spring.platform.jwt.JwtRequest;
import com.github.tscz.spring.platform.jwt.JwtResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.springframework.boot.SpringApplication;

import com.github.tscz.spring.platform.SpringBootPlatformApplication;

@SpringBootPlatformApplication
public class Application {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.validation.ConstraintViolationProblemModule;
import org.zalando.problem.violations.ConstraintViolationProblemModule;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

@ResponseStatus(HttpStatus.NOT_FOUND)
public class ResourceNotFoundException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;

public ResourceNotFoundException(String message) {
super(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.web.filter.OncePerRequestFilter;
import org.zalando.problem.Status;
import org.zalando.problem.spring.web.advice.validation.ConstraintViolationProblem;
import org.zalando.problem.spring.web.advice.validation.Violation;
import org.zalando.problem.violations.ConstraintViolationProblem;
import org.zalando.problem.violations.Violation;

public class JwtFilter extends OncePerRequestFilter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class JwtTokenUtil {
public ApplicationConfig config;

public Claims getAllClaimsFromToken(String token) {
return Jwts.parser().setSigningKey(config.getJwtSecret()).parseClaimsJws(token).getBody();
return Jwts.parserBuilder().setSigningKey(config.getJwtSecret()).build().parseClaimsJws(token).getBody();
}

public String generateToken(String username) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.zalando.problem.spring.web.advice.validation.ConstraintViolationProblem;
import org.zalando.problem.violations.ConstraintViolationProblem;

import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.MalformedJwtException;
Expand Down
2 changes: 1 addition & 1 deletion system.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java.runtime.version=12
java.runtime.version=14

0 comments on commit 6731fc1

Please sign in to comment.