Skip to content

Commit

Permalink
move restTemplate in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
BacicaFlorinTelus committed Oct 14, 2021
1 parent 23b05e6 commit f66fbf6
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import org.springframework.web.client.RestClientException
import org.springframework.web.client.RestTemplate

@Configuration
class ClientCredentials {
class ClientCredentials(
private val restTemplate: RestTemplate
) {

companion object {
/*
Expand All @@ -27,9 +29,6 @@ class ClientCredentials {
var authTokenCache: MutableMap<String, AuthToken> = mutableMapOf()
}

@Autowired
private lateinit var restTemplate: RestTemplate

@Value("\${auth-token-service.host}")
private lateinit var authTokenServiceHost: String

Expand Down

0 comments on commit f66fbf6

Please sign in to comment.