November 2017
Intermediate to advanced
420 pages
10h 29m
English
After specifying the Swagger provider components, the next step is to configure and initialize the Swagger definition. This is done by configuring the com.wordnik.swagger.jersey.config.JerseyJaxrsConfig servlet in web.xml, as follows:
<servlet>
<servlet-name>Jersey2Config</servlet-name>
<servlet-class>
com.wordnik.swagger.jersey.config.JerseyJaxrsConfig
</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>1.0.0</param-value>
</init-param>
<init-param>
<param-name>swagger.api.basepath</param-name>
<param-value>
http://localhost:8080/hrapp/webresources
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Here is a brief overview of the initialization parameters ...