1

Our SpringBoot app has a pom.xml that uses the swagger-maven-plugin, and when we run locally with "mvn spring-boot:run", we can view the swagger docs successfully.

However, if we run the app from Eclipse, using "Run As"->"Spring Boot", and then visit the swagger page, it says it can't find the swagger.json file.

I looked further and determined that the "fat jar" that we produce has the swagger.json file at META-INF/resources/<servicename>/swagger/swagger.json. I tried simply extracting that file and placing it in target/classes and then running the app from Eclipse, and now I can see the swagger docs properly.

I'd like to make the build do this automatically.

I inspected the docs for the swagger plugin, and I didn't see anything about this, but I didn't really expect to. Is there some other way to do this cleanly?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.