Skip to content

Commit

Permalink
Tell Spring Boot to use the simple HttpURLConnection for RestClient, …
Browse files Browse the repository at this point in the history
…like in Spring boot 3.3
  • Loading branch information
tdonohue committed Jan 15, 2025
1 parent 9d6746f commit 97d017a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dspace-server-webapp/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,15 @@ spring.servlet.multipart.max-file-size = 512MB

# Maximum size of a multipart request (i.e. max total size of all files in one request) (default = 10MB)
spring.servlet.multipart.max-request-size = 512MB

##################################
# Spring Boot's HTTP Client configuration (for RestClient and RestTemplate)
# https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#restclient-and-resttemplate
#
# "simple" tells Spring Boot to use JDK's HttpURLConnection (SimpleClientHttpRequestFactory)
# We have to configure this explicitly for DSpace because Spring Boot's autoconfiguration will attempt to
# use Jetty or similar if found on the classpath (and Jetty is on the classpath for Handle Server, etc)
spring.http.client.factory = simple
# "dont_follow" tells Spring Boot not to follow any redirects itself, but instead return the 3xx code to
# the user's browser.
spring.http.client.redirects = dont_follow

0 comments on commit 97d017a

Please sign in to comment.