Spring WebApplicationInitializer not working in wildfly 8.2.0 EAR Deployment

馋奶兔 提交于 2019-12-11 02:57:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!