Spring开始关注移动应用开发,发布Spring Mobile,Spring Android
近日,Roy Clarkson发布了Spring Mobile和Spring Android。
Spring Mobile
Spring Mobile 是 Spring MVC 的扩展,用来简化手机上的Web应用开发。
interceptor 定义的示例:
<interceptors> <!-- On pre-handle, detect the device that originated the web request --> <beans:bean /> </interceptors> <interceptors> <!-- On pre-handle, detect the device that originated the web request --> <beans:bean /></interceptors>
Please try again<c:if test="${!currentDevice.mobile}"> or <a href="<c:url value="/signup" />">sign up</a></c:if> Please try again<c:if test="${!currentDevice.mobile}"> or <a href="<c:url value="/signup" />">sign up</a></c:if>
<definition name="page" templateExpression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}page.jsp" /> <definition name="page" templateExpression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}page.jsp" />