Home > Software design >  Spring boot Wildfly deploy Swagger is not working
Spring boot Wildfly deploy Swagger is not working

Time:09-26

I deploy my spring boot application in wildfly recently I have to add swagger ui in my spring boot application. I have added that and its works locally but for some reason when I try to deploy my war file in the wildfly management console its show an error ( please see the image below ).I did not find a proper solution for the problem online.

Verions-

  • spring boot - 2.7.3
  • Java- 8
  • wildfly - 10

Error in wildfly management console

Error Image

CodePudding user response:

Seems your war package doesn't have classes of validation-api. Ensure whether your war package contains the relevant package. Or else remove that @NotBlank annotation from your code.

Actual Maven Package which contains the missing class. https://mvnrepository.com/artifact/javax.validation/

CodePudding user response:

If anyone is facing similar issue just add validation API to your pom.xml.

Thanks @Annamalai for your answer.

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
  • Related