We are doing a major upgrade from jave 8 to java 21 so we are having to upgrade many things all at once.
I am getting this crazy compiler error, I am running mvn compile and getting this error message.
[ERROR] /C:/dev/workspaces/.../src/main/java/com/.../config/SwaggerConfig.java:[13,49] cannot find symbol
[ERROR] symbol: class builder
[ERROR] location: class org.springdoc.core.models.GroupedOpenApi
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SwaggerConfig {
@Bean
public GroupedOpenApi api() {
GroupedOpenApi api = new GroupedOpenApi.builder()
.pathsToMatch("/path/**")
.build()
;
}
}
I have these dependencies in my pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
</dependency>