#d

1 messages · Page 1 of 1 (latest)

tiny forumBOT
#

<@&1004656351647117403> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
How do i add swagger openapi to springboot 4.0.5 app it just says ADD thingy in pom xlm file but it doesnt work it says dependency not found idk why

To add Swagger OpenAPI to a Spring Boot 4.0.5 app, you need to make sure you add the correct dependencies and configurations. The "dependency not found" error typically means the artifact ID, group ID, or version is wrong, or the repository is missing in your pom.xml.

For Spring Boot 4.x (compatible with Spring Framework 6), use the springdoc-openapi library, as springfox is not maintained for Spring Boot 4.

Key points:

  • Use org.springdoc:springdoc-openapi-starter-webmvc-ui for a standard web MVC project.
  • Make sure you include the correct version, for example 2.1.0 or newer.
  • Verify your Maven repo settings so it can resolve from Maven Central.

Example dependency snippet (do not replace your old code, just check it aligns):

<dependency>
  <groupId>org.springdoc</groupId>
  <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  <version>2.1.0</version>
</dependency>

If this fails, validate your Maven setup or proxy settings. You do not need to add any Swagger UI configuration manually—springdoc does it automatically.


Useful links: