No Spring WebApplicationInitializer types detected on classpath

前端 未结 13 1832
野的像风
野的像风 2020-11-29 08:03

My Eclipse project is suddenly no longer deploying properly. I can\'t trace it to any particular change I\'ve made to the environment.

I have tested with multiple s

13条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 09:03

    INFO: No Spring WebApplicationInitializer types detected on classpath.

    Can also show up if you're using Maven with Eclipse and deploying your WAR using;

    (Eclipse, Kepler, with M2)

    (right-click on your project) -> Run As -> Run on Server

    It's down to the generation and deletion of the m2e-wtp folder and contents.

    Make sure, Maven Archive generated files under the build directory is checked.

    Under: "Window -> preferences -> Maven -> Java EE Integration"

    Then:

    Use M2, to do your build, i.e. the usual Clean -> package or Install etc...

    If "Project -> Build Automatically" is not selected. You can force the "m2e-wtp folder and contents" generation by doing;

    "(right-click on your project) -> Maven -> Update Project..."

    Note: make sure the "Clean Projects" option is un-selected. Otherwise the contents of target/classes will be deleted and you're back to square one.

    Also,when;

    "Project -> Build Automatically" is selected the "m2e-wtp folder and contents" is generated

    or "Project -> Build All"

    or "(right-click on project) -> Build Project"

提交回复
热议问题