Spring Mobile is an extension to the popular web framework Spring Web MVC, 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 - 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-thymeleaf - example showing view names adjusted based on device, integrated with Thymeleaf for view resolution
- lite-device-resolver - illustrates DeviceResolver functionality and usage
- lite-device-resolver-xml - example using XML based configuration, illustrates DeviceResolver functionality and usage
- lite-site-preference-handler - illustrates SitePreferenceHandler functionality
- lite-site-switcher-handler-mdot - illustrates SiteSwitcherHandler functionality using the 'mDot' strategy
- lite-site-switcher-handler-urlpath - combines all features of Spring Mobile to showcase the use of the 'urlPath' site switching strategy
- thorax-lumbar-client - showcases the use of Spring Mobile with JavaScript libraries
Most of the sample apps can be built and run using the following commands from within the sample's folder.
-
Build the app:
$ mvn clean package
-
Deploy the .war to a Servlet 3 ServletContainer using Maven:
$ mvn tomcat7:run
Note: you may also import the project into your IDE and deploy to a Servlet 3 container such as Tomcat 7.
Pull requests are welcome. See the contributor guidelines for details.
Spring Mobile is released under version 2.0 of the Apache License.