I have made a basic CRUD app, wish to add Swagger with it.
My endpoints are -
@RequestMapping(value = "/api/v1")
GET - /get_all_bookings
POST - /new_booking
PUT - /update_booking/{id}
DELETE - /delete_booking/{id}
So I Included the dependency springfox-swagger2 & springfox-swagger-ui,
then a config package and inside it SwaggerConfig class,
@EnableSwagger2
public class SwaggerConfig {
    @Bean
    public Docket postsApi() {
        return new Docket(DocumentationType.SWAGGER_2).groupName("public-api")
                .apiInfo(apiInfo()).select().paths(postPaths()).build();
    }
    private Predicate<String> postPaths() {
        return or(regex("/api/v1/*"), regex("/api/v1/get_all_bookings*"));
    }
    private ApiInfo apiInfo() {
        return new ApiInfoBuilder().title("Demo API")
                .description("Placeholder")
                .termsOfServiceUrl("www.something.com")
                .contact("sandeep.roy2014@gmail.com").license("Free")
                .licenseUrl("www.somthing.com").version("1").build();
    }
}
It gives too many errors, which I'm not able to understand.
Error creating bean with name 'swagger2Controller': Lookup method resolution failed
Failed to introspect Class [springfox.documentation.swagger2.web.Swagger2Controller] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@2aae9190]
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
I'm not very sure, what exactly I'm doing wrong! Although all endpoints working fine when tried in Postman.