Spring Mobile is an extension to the popular Spring Web MVC web framework that aims to simplify the development of mobile web applications. This repository contains sample projects illustrating usage of Spring Mobile. See Spring Mobile on GitHub for more information about building from source.
The following sample applications demonstrate the capabilities of Spring Mobile for server-side device detection and handling. See the README within each sample project for more information and additional instructions.
- lite-device-delegating-view-resolver-jc - example showing view names adjusted based on device
- lite-device-delegating-view-resolver-xml - example using XML based configuration, showing view names adjusted based on device
- lite-device-delegating-view-resolver-jc-thymeleaf - example showing view names adjusted based on device, integrated with Thymeleaf for view resolution
- lite-device-resolver - Spring Boot application that illustrates DeviceResolver functionality and usage
- lite-device-resolver-jc - example using Java-based configuration
- lite-device-resolver-xml - example using XML based configuration
- lite-site-preference-handler-jc - illustrates SitePreferenceHandler functionality
- lite-site-switcher-handler-jc-mdot - illustrates SiteSwitcherHandler functionality using the 'mDot' strategy
- lite-site-switcher-handler-jc-urlpath - combines all features of Spring Mobile to showcase the use of the 'urlPath' site switching strategy
Most of the sample apps can be built and run using the following Gradle commands from within the sample's folder.
Build the app:
$ ./gradlew build
Deploy the .war to a Servlet 3 ServletContainer using Gradle:
$ ./gradlew tomcatRun
Maven configurations are also available for most of the sample apps.
Build the app:
$ mvn clean package
Deploy the .war to a Servlet 3 ServletContainer using Maven:
$ mvn tomcat7:run