Replacing web.xml with WebApplicationInitializer. Rename dispatcher-servlet.xml to dispatcher-config.xml