In this post we are going to add some of the CXF features to our existing app that we developed in previous post. These features are :
- ID Logging
- Jackson Provider for POJO to JSON conversion
- Swagger 2 documentation
Step 1: Configuration class
Create a RestServer class in config package as shown below
We have 3 @Bean methods, which are returning instances of each feature.
Step 2: POM dependencies
Step 3: Adding Swagger annotations
Add swagger annotations to Ping service that was created in previous past like below.
Now go ahead and deploy the server, and go at http://localhost:8080/services/services. You would get a link to swagger ui there.