Adding Swagger to a JavaEE Project – JavaEE Series 2 Part 2

You may also like...

14 Responses

  1. Mohsen Mesrzadeh says:

    what is and where is it?

  2. Alex says:

    Hello, I am trying to implement swagger in my app as you have explained but doing mvn clean package && copy / and target \ todo.war \ devtools \ wildfly-15.0.1.Final \ standalone \ deployments returns the following error.[8,31] package io.swagger.jaxrs.config does not exist

    Thanx Bro!

    • Dan says:

      I’d make sure you defined your maven dependencies accurately in your pom file. It sounds like Swagger isn’t being deployed within your jar file.

  3. kalabase says:

    good day,

    In the MyApplication class constructor we wiring ‘servletConfig’ but we not using it anywhere and in the same method ‘beanConfig’ is created but not assigned to anything, is something missing there?

  4. Richard Marais says:

    I get the following error:

    [ERROR] Error resolving version for plugin ‘’ from the repositories [local (/Users/richardmarais/.m2/repository), central (]: Plugin not found in any plugin repository -> [Help 1]

  5. Laurent says:

    I follow step by step you tutorial but when I launch my application the file /myApp/api/swagger.json is not created.
    If I put it manually everithing is working.
    I use a Tomcat server in Java 11, can it change something ?
    Thank you for your help and your tutorial !

    • Laurent says:

      Sorry, I find what was wrong.
      If someone has this error it was due to the version of jackson-databind which doesn’t contain com.fasterxml.jackson.databind.ObjectMapper.addMixIn (be back on version 2.9.8)
      Very good tutorial !

  6. wanyoike says:

    I am using a web.xml file.
    which configurations should be made for swagger to work?
    Or is it mandatory to have the class annotated with @ApplicationPath(“/api”)

  7. ANeel says:

    I follow the steps as mentioned but my swagger.json file is not generating

  8. Rico says:

    What about if I want to set the authorization header (like token) in swagger to an endpoint. What w’d I need to do?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.