Spring Mobile offers automatic detection of screen devices based on the request transaction. It will filter if the request is coming from a mobile device, tablet, or desktop. With the use of Bootstrap, Kickstrap, and other theming capabilities, we can design beforehand different layouts and templates that will fit per the device. Spring Mobile is Spring's support for web responsiveness.
Initially, the org.springframework.mobile.device.site.SitePreferenceWebArgumentResolver
and org.springframework.mobile.device.DeviceWebArgumentResolver
are configured so that site preference and device parameters can be used as arguments to our @Controller
.
<mvc:annotation-driven> <mvc:argument-resolvers> <bean class="org.springframework.mobile .device.site.SitePreferenceWebArgumentResolver" /> <bean class="org.springframework.mobile .device.DeviceWebArgumentResolver" /> </mvc:argument-resolvers...