How to solve “Failed to instantiate WebApplicationInitializer class”

后端 未结 2 1637
野性不改
野性不改 2021-01-24 03:44

I have a CRUD spring application that does not run because of dependencies. I need the part of packaging with \"war\" but could not reach it.

My pom.xml is:



        
2条回答
  •  误落风尘
    2021-01-24 04:21

    In your pom.xml, you are setting spring-core as optional, which could be causing exclusion of the spring-core from the war file. Either remove the optional from the spring-core dependency or copy this jar under tomcat/lib folder, so that its available to the application. Here is the maven link for the optional dependencies:

    Maven Optional Dependencies

提交回复
热议问题