aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml7
-rw-r--r--src/main/java/com/juick/config/SecurityConfig.java2
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java16
3 files changed, 15 insertions, 10 deletions
diff --git a/pom.xml b/pom.xml
index 8e4fbc03a..d6e2ec5ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>3.3.5</version>
+ <version>3.4.0</version>
<relativePath />
</parent>
<groupId>com.juick</groupId>
@@ -23,6 +23,7 @@
<jjwt.version>0.12.6</jjwt.version>
<rome.version>2.1.0</rome.version>
<org.mapstruct.version>1.6.3</org.mapstruct.version>
+ <okhttp.version>4.12.0</okhttp.version>
</properties>
<dependencies>
<dependency>
@@ -97,10 +98,12 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
+ <version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
+ <version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
@@ -130,7 +133,7 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>net.sourceforge.htmlunit</groupId>
+ <groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
<exclusions>
diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java
index a93a4a5ca..ac61f8f69 100644
--- a/src/main/java/com/juick/config/SecurityConfig.java
+++ b/src/main/java/com/juick/config/SecurityConfig.java
@@ -228,6 +228,7 @@ public class SecurityConfig {
}
@Bean
+ @Order(Ordered.HIGHEST_PRECEDENCE + 1)
SecurityFilterChain h2ConsoleFilterChain(HttpSecurity http) throws Exception {
http.securityMatcher("/h2-console/**")
.authorizeHttpRequests(auth -> auth
@@ -294,6 +295,7 @@ public class SecurityConfig {
}
@Bean
+ @Order(Ordered.HIGHEST_PRECEDENCE + 1)
public SecurityFilterChain securityWebFilterChain(
HttpSecurity http) throws Exception {
return http.securityMatcher("/actuator/**")
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 34e72ec7c..5782475ea 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -22,11 +22,11 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gargoylesoftware.htmlunit.CookieManager;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.css.StyleElement;
-import com.gargoylesoftware.htmlunit.html.DomElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import org.htmlunit.CookieManager;
+import org.htmlunit.WebClient;
+import org.htmlunit.css.StyleElement;
+import org.htmlunit.html.DomElement;
+import org.htmlunit.html.HtmlPage;
import com.github.scribejava.apis.AppleClientSecretGenerator;
import com.jayway.jsonpath.JsonPath;
import com.juick.*;
@@ -1701,7 +1701,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
HtmlPage threadPage = webClient.getPage(String.format(baseUri + "ugnich/%d", mid));
assertThat(threadPage.getWebResponse().getStatusCode(), equalTo(200));
@@ -1798,7 +1798,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
HtmlPage discussions = webClient.getPage(baseUri);
assertThat(discussions.querySelectorAll("article").size(), is(0));
@@ -1890,7 +1890,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
int mid = messagesService.createMessage(ugnich.getUid(), "new test", null, Set.of());
subscriptionService.subscribeMessage(messagesService.getMessage(mid).get(), freefd);