Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot 3.4.1 #171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21.0.5
4 changes: 2 additions & 2 deletions department-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.8.3</version>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${spring-openai-mvc.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
4 changes: 2 additions & 2 deletions employee-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.8.3</version>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${spring-openai-mvc.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
7 changes: 1 addition & 6 deletions gateway-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-api</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
<version>2.8.3</version>
<version>${spring-openai-flux.version}</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.properties.AbstractSwaggerUiConfigProperties;
import org.springdoc.core.properties.SwaggerUiConfigParameters;
import org.springdoc.core.properties.AbstractSwaggerUiConfigProperties.SwaggerUrl;
import org.springdoc.core.properties.SwaggerUiConfigProperties;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
Expand All @@ -16,6 +17,9 @@
import java.util.List;
import java.util.Set;

import static org.springdoc.core.utils.Constants.DEFAULT_API_DOCS_URL;


@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApplication {
Expand All @@ -28,16 +32,15 @@ public static void main(String[] args) {

@Bean
@Lazy(false)
public Set<AbstractSwaggerUiConfigProperties.SwaggerUrl> apis(RouteDefinitionLocator locator,
SwaggerUiConfigParameters swaggerUiConfigParameters) {
Set<AbstractSwaggerUiConfigProperties.SwaggerUrl> urls = new HashSet<>();
public Set<SwaggerUrl> apis(RouteDefinitionLocator locator, SwaggerUiConfigProperties swaggerUiConfigProperties) {
Set<SwaggerUrl> urls = new HashSet<>();
List<RouteDefinition> definitions = locator.getRouteDefinitions().collectList().block();
definitions.stream().filter(routeDefinition -> routeDefinition.getId().matches(".*-service")).forEach(routeDefinition -> {
String name = routeDefinition.getId().replaceAll("-service", "");
AbstractSwaggerUiConfigProperties.SwaggerUrl swaggerUrl = new AbstractSwaggerUiConfigProperties.SwaggerUrl(name, "/" + name, null);
SwaggerUrl swaggerUrl = new SwaggerUrl(name, DEFAULT_API_DOCS_URL+"/" + name, null);
urls.add(swaggerUrl);
});
swaggerUiConfigParameters.setUrls(urls);
swaggerUiConfigProperties.setUrls(urls);
return urls;
}

Expand Down
4 changes: 2 additions & 2 deletions organization-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.8.3</version>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${spring-openai-mvc.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<version>3.4.1</version>
<relativePath />
</parent>

Expand All @@ -16,7 +16,9 @@

<properties>
<java.version>21</java.version>
<spring-cloud.version>2023.0.5</spring-cloud.version>
<spring-cloud.version>2024.0.0</spring-cloud.version>
<spring-openai-mvc.version>2.8.3</spring-openai-mvc.version>
<spring-openai-flux.version>2.8.3</spring-openai-flux.version>
<sonar.projectKey>piomin_sample-spring-microservices-new</sonar.projectKey>
<sonar.organization>piomin</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down