springMVC-主题
来源:互联网 发布:c语言编译程序的软件 编辑:程序博客网 时间:2024/04/28 14:18
使用springMVC完成多主题切换功能
1.springMVC.xml
<!-- theme解析器 --><bean id="themeChangeInterceptor"class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"><property name="paramName" value="themeName"></property></bean><bean id="themeSource"class="org.springframework.ui.context.support.ResourceBundleThemeSource"><property name="basenamePrefix" value="themes."></property></bean><bean id="themeResolver"class="org.springframework.web.servlet.theme.CookieThemeResolver"><property name="defaultThemeName" value="style_default" /></bean>
拦截器
<mvc:interceptors><mvc:interceptor><mvc:mapping path="/**" /><ref bean="themeChangeInterceptor" /></mvc:interceptor></mvc:interceptors>
2.项目结构
3.页面标签
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<link href="<%=basePath %><spring:theme code='styleSheet'/>" rel="stylesheet" type="text/css" />
4.style.properties文件
styleSheet=common/css/style2.csshomeTreetableLayout=common/js/treetable/home_treetablelayout.csshomeTreetable=common/js/treetable/home_treetable.csscard_img_play=common/images/default/card_playorpause.pngcard_detail_deviceimp=common/images/default/card_redimp.pngcard_detail_managerimp=common/images/default/card_yellowimp.pngcard_detail_policename=common/images/default/card_police.pngcard_detail_publicsecurity=common/images/default/card_publicsecurity.pngcard_detail_devicecode=common/images/default/card_device.pngcard_detail_datetime=common/images/default/card_time.png
0 0
- springMVC-主题
- springMVC主题的使用
- 主题:SpringMVC深度探险(一) —— SpringMVC前传
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- 主题
- DWR高级主题之DWR与spring集成(使用springMVC,非注解的实例)
- 不知道
- Windows中mysql数据库中文乱码永久解决方法
- dip2px 和 px2dip +0.5f是什么鬼?
- 基于InstallShield2013LimitedEdition的安装包制作
- 点击linearLayout,拨打手机系统电话
- springMVC-主题
- 驱动、固件
- adapter
- Android进阶图片处理内存优化系列之图片墙案例
- Java miscellany
- 正则表达式学习笔记
- zookeeper 数据存储特点
- 为什么使用LinkedList时如果用addFirst方法,不能继承父类collection接口
- freeswitch被叫忙处理