Spring MVC without web.xml using WebApplicationInitializer - Bartosz Kielczewski
Few months ago I started playing with Spring Framework, which I really enjoy. Looking for the tutorials I found some really great resources on the web as well as books. Unfortunately many of them were written for Spring 2.x, which lacks some recent features, mainly ability to configure everything by Java annotations (a.k.a. JavaConfig) rather than XML. That was something that kept me away from Spring at the first place - doing it programmatically gives much more sense of control and is more readable. So, that's what I'm trying to achieve here, I'll try to show you how to do it in more 'modern' way, showing integrations with various software packages along the way.
Let's start with a simple skeleton Spring MVC application. Since version 3.1 it has Servlet 3 API support, I won't use web.xml for configuring DispatcherServlet
, rather I'll configure it programmatically.
Read full article from Spring MVC without web.xml using WebApplicationInitializer - Bartosz Kielczewski
No comments:
Post a Comment