Skip to content

Commit

Permalink
#2462 - use the HttpClient configured RestTemplate bean
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmayo committed Nov 10, 2023
1 parent 15d065f commit 6e9fd68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/src/main/java/skills/auth/pki/PkiUserLookup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import groovy.util.logging.Slf4j
import jakarta.annotation.PostConstruct
import jakarta.annotation.PreDestroy
import jakarta.servlet.http.HttpServletRequest
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Conditional
import org.springframework.core.ParameterizedTypeReference
Expand All @@ -46,8 +47,8 @@ import java.util.concurrent.TimeUnit
class PkiUserLookup {

// use @Autowired if you want to utilize apache HttpClient (see HttpClientRestTemplateConfig)
// @Autowired
RestTemplate restTemplate = new RestTemplate()
@Autowired
RestTemplate restTemplate

@Value('${skills.authorization.userInfoUri}')
String userInfoUri
Expand Down

0 comments on commit 6e9fd68

Please sign in to comment.