SpringMobileModule activates support for Spring Mobile in the Across context.
ViewResolver beans will be configured for device specific views and
DeviceType resolving will be enabled.
By default the SpringMobileModule will configure the Across web
ViewResolver beans to look for /mobile and /tablet specific views with fallback options.
LiteDeviceResolver will also be available along with a
DeviceBasedViewNameResolver can be wired to prepend view names with the prefix of the current device.
Once the SpringMobileModule is active, Thymeleaf and/or JSP views with the right prefixes will automatically be picked up.
The springMobile.deviceResolverRegistration property can be used to determine how the
DeviceResolver should be registered.
The resolver can be registered as a Servlet Filter for all servlets (default) or as a
When registered as a
HandlerInterceptor, the interceptor will apply to all prefixing contexts (this includes for example AdminWeb and DebugWeb).
The springMobile.deviceTypes property determines the list of
DeviceType instances that are supported.
View resolving for these types will be enabled.
To use device-specific Thymeleaf fragments, a
DeviceDialect is added.
This allows the usage of the device:replace attribute which will replace the host tag by the device-specific fragment.
Using device:replace is a drop-in alternative to th:replace for device-specific view support.