How to solve “Failed to instantiate WebApplicationInitializer class”

后端 未结 2 1606
野性不改
野性不改 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:08

    In you pom.xml add commons-logging-1.1.3 dependency only, i faced same issue but after adding this jar it is working fine.

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题