The CXF Swagger2Feature allows you to generate Swagger 2.0 documents from JAX-RS service endpoints with a simple configuration. 见:http://cxf.apache.org/docs/swagger2feature.html
JAX-RS Swagger2Feature
Demo
=================
The demo shows a basic usage of Swagger 2.0 API documentation with REST based Web Services using
JAX-RS 2.0 (JSR-339). Swagger UI is available at: http://localhost:9000/
Building and running the demo using Maven
---------------------------------------
From the base directory of this sample (i.e., where this README file is
located), the Maven pom.xml file can be used to build and run the demo.
Using either UNIX or Windows:
mvn install
mvn -Pserver (from one command line window)
After the service is started, the Swagger API documents in JSON and YAML