Spring Mobile: how to add DeviceWebArgumentResolver programatically?
===

Spring mobile [documentation][1] suggest adding the following configuration:

    <mvc:annotation-driven>
        <mvc:argument-resolvers>
            <beans:bean class="org.springframework.mobile.device.DeviceWebArgumentResolver" />
        </mvc:argument-resolvers>
    </mvc:annotation-driven>

to pass the current Device object as an argument to `@Controller` methods.

Yet, one can use:

    @EnableWebMvc
    @Configuration
    public class WebConfig extends WebMvcConfigurerAdapter {
    
    }

and bypass `<mvc:annotation-driven>` configuration. 

Then, how to add a `DeviceWebArgumentResolver` programatically?


  [1]: http://static.springsource.org/spring-mobile/docs/1.0.x/reference/htmlsingle/