panipsilos
panipsilos

Reputation: 2209

Setup Swagger with Jaxrs eclipse and tomcat

I m new to Swagger project. I used the swagger editor to create an API and then generated server code for JAX-RS. What I need is to integrate the code with an eclipse project and deploy it on Tomcat. However, I see that the swagger generated code uses a jetty server. Is there any example showing how to set up swagger with eclipse and Tomcat?

Upvotes: 2

Views: 1257

Answers (1)

fehguy
fehguy

Reputation: 6824

The output of the code generator is a war file. You can run that anywhere, including with tomcat. If you want an example of doing so, please look here:

https://github.com/swagger-api/swagger-samples/blob/master/java/java-jaxrs-cxf/pom.xml

But it is truly just a war file, so it's portable across Java servlet containers.

Upvotes: 1

Related Questions