Java Project: Failed to load ApplicationContext

后端 未结 3 1646
情深已故
情深已故 2020-12-28 12:55

I have a Java Project in which I am writing a simple JUNIT test case. I have copied the applicatinoContext.xml file into the root java source directory. I\'ve tried it wit

3条回答
  •  余生分开走
    2020-12-28 13:39

    I've faced this issue because during bootstrapping my spring project using the class that implements ApplicationListener and inside onApplicationEvent function it throws an exception

    so make sure that your application bootstrap points do not throw any exception

    in my case, I was using maven surefire plugin for testing so to debug the test process use this command

    mvn -Dmaven.surefire.debug test
    

提交回复
热议问题