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

You may also like...

9 Responses

  1. Mohsen Mesrzadeh says:

    what is MyApplication.java 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.

    MyApplication.java:[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 ‘com.google.code.maven-replacer-plugin:replacer’ from the repositories [local (/Users/richardmarais/.m2/repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]

  5. Laurent says:

    Hello
    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 !

Leave a Reply

Your email address will not be published. Required fields are marked *

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