-
create maven project
-
set up server runtime to Tomcat7 in Eclipse
-
add maven plugin of "Swagger Jersey2 Jaxrs" http://mvnrepository.com/artifact/io.swagger/swagger-jersey2-jaxrs/1.5.0
-
download swagger 2.0 libs
-
inn SwaggerDocumentSetup.java, you may modify beanConfig.setSchemes(new String[]{"http"}); beanConfig.setBasePath("/japi/services"); beanConfig.setResourcePackage( "com.control2me.japi.services" );
-
create java api and swagger api docs
-
run test from web browser- swager: http://localhost:8080/japi/api-docs/ api: http://localhost:8080/japi/services/v1/users/12345
-
create CRUD methods for data access layer
- use MongoDB client