A Spring Mobile sample application demonstrating many of the capabilities of the Spring Mobile Device module, including:
- "Lite" device resolution through the use of DeviceResolverHandlerInterceptor
- Site preference management via SitePreferenceHandlerInterceptor
- View resolution with LiteDeviceDelegatingViewResolver
- Spring Boot auto-configuration
- Thymeleaf views
Spring Boot support is enabled through a property defined in application.properties
. By default LiteDeviceDelegatingViewResolver
is disabled in Spring Mobile auto-configuration. If the following property is not declared or is set to false, then this feature will be disabled.
src/main/resources/application.properties
spring.mobile.devicedelegatingviewresolver.enabled: true
-
Build with Gradle:
$ ./gradlew build
Or Maven:
$ mvn clean package
-
Run Spring Boot with Gradle:
./gradlew bootRun
Or Maven:
$ mvn spring-boot:run
-
View the sample application at the following URL:
Note: access the site from your browser, Android emulator or iOS simulator to demonstrate the functionality.
Spring Mobile is released under version 2.0 of the Apache License.