1

Got this while deploying the spring boot war on tomcat. Anyone got this error I have below steps :

Pom.xml : org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>

</dependencies>

Main Class :

@SpringBootApplication
public class MainApp extends SpringBootServletInitializer{

    @Override
    protected SpringApplicationBuilder configure (SpringApplicationBuilder builder) {
        return builder.sources(MainApp.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(MainApp.class, args);
    }

}
halfelf
  • 9,737
  • 13
  • 54
  • 63
Jang2212
  • 11
  • 1
  • 2
  • 1
    Possible duplicate of [More than one fragment with the name \[spring\_web\] was found. This is not legal with relative ordering](https://stackoverflow.com/questions/54290263/more-than-one-fragment-with-the-name-spring-web-was-found-this-is-not-legal-w) – g00glen00b Mar 19 '19 at 12:55
  • No its different from it.. Any way its worked fine when deployed on another tomcat.. Still in a search for the proper reason of the error.. – Jang2212 Mar 25 '19 at 09:50
  • @Jang2212 Any solution u found?? – KJEjava48 Aug 23 '19 at 11:16

0 Answers0