applicationContext not finding Controllers for Servlet context

后端 未结 3 481

I have a Spring web app with an applicationContext.xml and a dispatcher-servlet.xml configuration. I\'ve defined the in applic

3条回答
  •  -上瘾入骨i
    2020-12-01 04:38

    I had the same problem and after comparing my web.xml code with this tutorial I changed it and it worked. here is my web.xml file:

    
    
        contextConfigLocation
        classpath:spring/business-config.xml
    
    
    
        org.springframework.web.context.ContextLoaderListener
    
    
    
        mvc-dispatcher
        org.springframework.web.servlet.DispatcherServlet
    
    
    
        mvc-dispatcher
        /
    
    

    context-param and listener were what I missed.

    I hope it helps you.

提交回复
热议问题