In order to see an example Spring Boot project where the starter replaced the older Springfox version, visit the 951ba8dc0fd805c21daf8a483ab730b19f30677f commit.
Add Springfox Boot starter
First, add the maven dependency to your
Second, create a class where we’re going to configure Swagger docs, like in my example SwaggerConfig.java file from the
Finally, we have to configure handling resources. You’ll find the example config from the Springfox documentation below:
The scrum_ally project uses Angular, so the its configuration is a little bit different, you can find it in the MvcConfiguration file.
In the end, we can finally start our app and see the documentation. We should be able to get the project specification in json by calling the http://localhost:8080/v3/api-docs endpoint (example in Postman):
Adjust the security config
In order to allow all GET requests to the documentation resources when your project uses Spring Boot security starter, add this matcher to your config:
- Migrating Springfox from existing 2.x version
- What is Swagger UI
- Online editor for the project specification where you can paste the json from the http://localhost:8080/v3/api-docs