1 2 3 4 5 |
@Bean public OpenAPI customOpenAPI() { return new OpenAPI() .info(new Info().title("API Title").version("v1")); } |
1 2 3 4 5 6 |
configurations.all { resolutionStrategy { force 'org.springframework:spring-web:6.0.0' force 'org.springframework:spring-core:6.0.0' } } |
1 2 3 4 5 6 7 8 9 10 11 12 |
dependencies { implementation 'org.springframework.boot:spring-boot-starter-web:3.4.1' // Ensure this version is compatible with Spring Boot 3.x implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0' // Compatible version with Spring Boot 3.x } dependencies { implementation('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0') { exclude group: 'org.springframework', module: 'spring-web' exclude group: 'org.springframework', module: 'spring-core' } } |
1 |
implementation 'org.springdoc:springdoc-openapi-webmvc-core:2.1.0' |
1 |
implementation 'org.springframework:spring-core:6.2.1' // Specify the version you're using |
1 2 3 4 5 6 7 |
dependencies { // AWS SDK 2.x for S3 implementation 'software.amazon.awssdk:s3:2.20.9' // Use the latest version available // AWS SDK 2.x for OpenSearch (Elasticsearch) implementation 'software.amazon.awssdk:opensearch:2.20.9' // Use the latest version available } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
package com.accuity.kyc.da.config; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.HttpClients; import org.apache.hc.core5.ssl.SSLContextBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @Configuration public class RestTemplateConfig { @Bean public CloseableHttpClient httpClient() { // You can customize HttpClient here, e.g., setting timeouts, SSL, etc. return HttpClients.custom() .disableRedirectHandling() // Optional: Disable automatic redirects .build(); } @Bean public RestTemplate restTemplate(CloseableHttpClient httpClient) { // Wrap the custom HttpClient into the HttpComponentsClientHttpRequestFactory HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); // Return the RestTemplate with the custom request factory return new RestTemplate(factory); } } |
1 |
spring.web.client.default-request-factory=org.springframework.http.client.HttpComponentsClientHttpRequestFactory |