These are chat archives for spring-cloud/spring-cloud
Last January 30th, I posted a question about accessing a config server that used a self-signed SSL certifcate. Since then, I have been able to get that to work by following the instructions at http://cloud.spring.io/spring-cloud-static/Edgware.SR1/multi/multi__spring_cloud_config_client.html#custom-rest-template, so I thought I'd post my solution here in case others want to do the same thing. My implementation of a CustomConfigServiceBootstrapConfiguration class can be found at https://github.com/patguimaraes/cloud-native-samples/blob/master/auth-service/src/main/java/sample/authservice/configuration/CustomConfigServiceBootstrapConfiguration.java.
I have a question for the spring-cloud developers though. I originally used the code below to create my custom RestTemplate:
RestTemplateBuilder restTemplateBuilder = new RestTemplateBuilder(); restTemplateBuilder.requestFactory(clientHttpRequestFactory); RestTemplate restTemplate = restTemplateBuilder.build();
But this code did not cause my custom RestTemplate to be used to access my config server. When I replaced the code above with the line of code below, my custom RestTemplate was used:
RestTemplate restTemplate = new RestTemplate(clientHttpRequestFactory);
Shouldn't both code snippets above produce the same result?
@Valueor pull it out of a
@ConfigurationProperties. I suppose it depends where you need it.
Traversonin Spring HATEOS. It's a bit thin. But nothing to do with Spring Cloud.
@EnableResourceServerannotation and have experimented with various
Authenticationis always null when I try to read it. Things works fine on a normal resource server, but on the auth server things do not.