问题
I have very simple EAR with one spring mvc web app (war), all spring libraries are in myear.ear/lib folder.
I'm not using web.xml instead i'm trying to use WebApplicationInitializer but Wildfly server is not detecting this and i'm getting 404 page. But if i have spring-mvc libs inside WEB-INF/lib then its working.
Even I have put debug pointer at my WebApplicationInitializer implementation but it doesn't seem calling the onStartup method itself (and No error logged). Has anybody faced the same issue? Can anyone help?
回答1:
This got fixed in Wildfly 9.0.0 beta WFLY-4205
回答2:
https://jira.spring.io/browse/SPR-12555 Its seems spring mvc works as designed, server wont recognize WebApplicationInitializer if spring-web.jar is not inside WEB-INF/lib. Possible solutions are discussed in the jira link above
来源:https://stackoverflow.com/questions/27545230/spring-webapplicationinitializer-not-working-in-wildfly-8-2-0-ear-deployment