diff --git a/pom.xml b/pom.xml
index 95eaeb5..65002b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,12 +6,12 @@
0.0.1-SNAPSHOT
UTF-8
- 4.1.1.RELEASE
+ 5.0.4
org.springframework.boot
spring-boot-starter-parent
- 1.2.3.RELEASE
+ 3.2.12
@@ -19,10 +19,35 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.0
+ 3.13.0
- 1.8
- 1.8
+ 21
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ **/*Test.*
+ **/*Spec.*
+
+
+
+
+ org.codehaus.gmavenplus
+ gmavenplus-plugin
+ 3.0.2
+
+
+
+ compileTests
+
+
+
+
+ 21
@@ -30,127 +55,56 @@
io.spring.repo.maven.milestone
- http://repo.spring.io/milestone/
+ https://repo.spring.io/milestone/
false
-
- org.springframework
- spring-test
- 4.1.6.RELEASE
- test
-
org.spockframework
spock-spring
- 1.0-groovy-2.4
-
-
- org.codehaus.groovy
- groovy-all
-
-
+ 2.4-groovy-5.0
test
commons-io
commons-io
- 2.4
+ 2.18.0
commons-codec
commons-codec
- 1.10
+ 1.17.1
org.springframework.boot
spring-boot-starter-web
- 1.2.3.RELEASE
org.springframework.boot
spring-boot-starter-actuator
- 1.2.3.RELEASE
org.springframework.boot
spring-boot-starter-test
- 1.2.3.RELEASE
-
-
- org.springframework
- spring-test
-
-
test
org.spockframework
spock-core
- 1.0-groovy-2.4
+ 2.4-groovy-5.0
test
com.google.guava
guava
- 18.0
-
-
- cglib
- cglib-nodep
- 3.1
-
-
- org.springframework
- spring-beans
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-context
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-context-support
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-webmvc
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-web
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-aop
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-core
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-expression
- 4.1.6.RELEASE
-
-
- org.springframework
- spring-test
- 4.1.6.RELEASE
- test
+ 33.4.0-jre
- org.codehaus.groovy
+ org.apache.groovy
groovy-all
- 2.4.3
+ 5.0.4
+ pom
diff --git a/src/main/java/com/nurkiewicz/download/MainApplication.java b/src/main/java/com/nurkiewicz/download/MainApplication.java
index 3bccd44..fe10ce1 100644
--- a/src/main/java/com/nurkiewicz/download/MainApplication.java
+++ b/src/main/java/com/nurkiewicz/download/MainApplication.java
@@ -7,7 +7,7 @@
class MainApplication {
public static void main(String[] args) {
- Integer temp = new Integer("1234");
+ Integer temp = Integer.valueOf("1234");
SpringApplication.run(MainApplication.class, args);
}
}
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
index 18b78e5..b46488e 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback.xml
@@ -5,11 +5,13 @@
+
+
+ %d{HH:mm:ss.SSS} | %thread | %-5level | %logger{1} | %msg%n
+
+
+
-
-
- %d{HH:mm:ss.SSS} | %thread | %-5level | %logger{1} | %msg%n
-
-
+
\ No newline at end of file
diff --git a/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy b/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy
index dc1b692..b880d5b 100644
--- a/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy
+++ b/src/test/groovy/com/nurkiewicz/download/DownloadControllerTest.groovy
@@ -1,9 +1,8 @@
package com.nurkiewicz.download
import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles
-import org.springframework.test.context.ContextConfiguration
-import org.springframework.test.context.web.WebAppConfiguration
import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.setup.MockMvcBuilders
import org.springframework.web.context.WebApplicationContext
@@ -14,13 +13,12 @@ import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
-import static com.google.common.net.HttpHeaders.*
+import static org.springframework.http.HttpHeaders.*
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.head
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*
-@WebAppConfiguration
-@ContextConfiguration(classes = [MainApplication])
+@SpringBootTest(classes = [MainApplication])
@ActiveProfiles("test")
class DownloadControllerSpec extends Specification {
diff --git a/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java b/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java
index 50b2c90..e0a60fc 100644
--- a/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java
+++ b/src/test/java/org/springframework/web/filter/Sha512ShallowEtagHeaderFilter.java
@@ -3,10 +3,14 @@
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
+import java.io.IOException;
+import java.io.InputStream;
+
public class Sha512ShallowEtagHeaderFilter extends ShallowEtagHeaderFilter {
@Override
- protected String generateETagHeaderValue(byte[] bytes) {
+ protected String generateETagHeaderValue(InputStream inputStream, boolean isContentCachingDisabled) throws IOException {
+ final byte[] bytes = inputStream.readAllBytes();
final HashCode hash = Hashing.sha512().hashBytes(bytes);
return "\"" + hash + "\"";
}