I'm looking at a Spring MVC Java configuration file from Craig Walls' Spring In Action volume 4:
The addResourceHandlers(...) method is equivalent to the XML configuration element <mvc:resources.../> element. I'm use to seeing something like
<mvc:resources mapping="/resources/**" location="/resources"/> for static resources located in /webapp/resources/, as is the case in the book's projects. In this case, the call above should equate to
according to my understanding of the Spring documentation. I'm wondering why the call in the WebConfig.java file above seems to work?
Given the sample book's code, there are some xml in the /WEB-INF/spring folder but I'm not if those actually make the app work.
I did a testing app that set up just like his using JavaConfig.... and when I run it, it didn't work got a 404 and in the server log got a "No spring web app initializer found in classpath" or something like that.
Then comparing his code to other people's code about web app initializer, I see a big? difference:
Craig's code extends AbstractAnnotationConfigDispatcherServletInitializer while other people implements WebApplicationInitializer
Does extending AbstractAnnotationConfigDispatcherServletInitializer have the same effect as implementing WebApplicationInitializer??