AVA-12458 Potential issue in Spring Cloud OpenFeign article (#12821)
* AVA-12458 Potential issue in Spring Cloud OpenFeign article * AVA-12458 Commit to re-run he Jenkins build * JAVA-12458 Revert formatting changes as Jenkins build has passed
This commit is contained in:
parent
ca42c91c55
commit
da42c4af4f
|
@ -1,15 +1,14 @@
|
|||
package com.baeldung.cloud.openfeign.config;
|
||||
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import feign.Logger;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.auth.BasicAuthRequestInterceptor;
|
||||
import feign.codec.ErrorDecoder;
|
||||
import feign.okhttp.OkHttpClient;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class ClientConfiguration {
|
||||
|
||||
@Bean
|
||||
|
@ -19,7 +18,7 @@ public class ClientConfiguration {
|
|||
|
||||
@Bean
|
||||
public ErrorDecoder errorDecoder() {
|
||||
return new ErrorDecoder.Default();
|
||||
return new CustomErrorDecoder();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
package com.baeldung.cloud.openfeign.oauthfeign;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.oauth2.client.*;
|
||||
import org.springframework.security.oauth2.client.AuthorizedClientServiceOAuth2AuthorizedClientManager;
|
||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager;
|
||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProvider;
|
||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder;
|
||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
|
||||
import org.springframework.security.oauth2.client.registration.ClientRegistration;
|
||||
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
|
||||
|
||||
@Configuration
|
||||
import feign.RequestInterceptor;
|
||||
|
||||
public class OAuthFeignConfig {
|
||||
|
||||
public static final String CLIENT_REGISTRATION_ID = "keycloak";
|
||||
|
|
Loading…
Reference in New Issue