jenkins+github+maven+selenium在mac上持续集成(CI)
2014-08-14 12:15
429 查看
velocity luna 安装velocity插件解决方案
折腾了两天,velocity都没装上。ok 。原因很简单。eclipse4.4就不支持velocity。。。。重新装了eclipse 4.3就好了。直接用个 trunk版本的在现状http://veloeclipse.googlecode.com/svn/trunk/update/靠。折腾死人了。各种配置。eclipse4.4这算bug啊,还是velocity不更新就不能支持下一代eclipse了 啊。。。
在Spring的配置文件applicationContext.xml中配置velocity视图解析器。
velocityConfig:
configLoation里放velocity.perperties 属性文件。里面记录了 velocity模板的扫描位置,输入输出编码格式等,这是一个全局配置。
如上属性文件里的对象。如下: VelocityLayoutViewResolver是基于格局的一种resolver,layoutUrl里放模板的url。
注意layout类型的界面布局因为是嵌套式的界面布局,尽量少用,容易出错。
比如下一节会讲到的ztree整合velocity 因为ztree也是嵌套式界面布局,结果导致循环嵌套,界面错误了。
一般来说,使用如下布局结构
折腾了两天,velocity都没装上。ok 。原因很简单。eclipse4.4就不支持velocity。。。。重新装了eclipse 4.3就好了。直接用个 trunk版本的在现状http://veloeclipse.googlecode.com/svn/trunk/update/靠。折腾死人了。各种配置。eclipse4.4这算bug啊,还是velocity不更新就不能支持下一代eclipse了 啊。。。
在Spring的配置文件applicationContext.xml中配置velocity视图解析器。
velocityConfig:
configLoation里放velocity.perperties 属性文件。里面记录了 velocity模板的扫描位置,输入输出编码格式等,这是一个全局配置。
velocimacro.permissions.allow.inline=true velocimacro.permissions.allow.inline.to.replace.global=true velocimacro.permissions.allow.inline.local.scope=true input.encoding=UTF-8 output.encoding=UTF-8 contentType=text/html;charset=UTF-8
resource.loader=webapp, class class.resource.loader.description=Velocity Classpath Resource Loader class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader webapp.resource.loader.class=org.apache.velocity.tools.view.WebappResourceLoader webapp.resource.loader.path=/WEB-INF/velocity/ webapp.resource.loader.cache=false
如上属性文件里的对象。如下: VelocityLayoutViewResolver是基于格局的一种resolver,layoutUrl里放模板的url。
<!-- velocity视图解析配置 http://kim-miao.iteye.com/blog/1053928 --> <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> <property name="configLocation"> <value>/WEB-INF/velocity/velocity.properties</value> </property> <property name="resourceLoaderPath"> <value>/WEB-INF/velocity/</value> </property> <property name="velocityProperties"> <props> <prop key="input.encoding">utf-8</prop> <prop key="output.encoding">utf-8</prop> </props> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver"> <property name="cache" value="true" /> <property name="layoutUrl" value="/layout/main.vm" /> <property name="prefix" value="/templates/" /> <property name="suffix" value=".vm" /> <property name="allowSessionOverride" value="true" /> <property name="allowRequestOverride" value="true" /> <property name="exposeSessionAttributes" value="true" /> <property name="requestContextAttribute" value="rc" /> <property name="exposeRequestAttributes" value="true" /> </bean>
注意layout类型的界面布局因为是嵌套式的界面布局,尽量少用,容易出错。
比如下一节会讲到的ztree整合velocity 因为ztree也是嵌套式界面布局,结果导致循环嵌套,界面错误了。
一般来说,使用如下布局结构
<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="prefix" value="/template/"/> <property name="suffix" value=".vm" /> <property name="contentType"> <value>text/html;charset=utf-8</value> </property> </bean> <bean id="viewResolverSession" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="suffix"> <value>.vm</value> </property> <property name="contentType"> <value>text/html;charset=utf-8</value> </property> <property name="exposeSessionAttributes"> <value>true</value> </property> </bean>
相关文章推荐
- jenkins+github+maven+selenium在mac上持续集成(CI)
- jenkins+maven+github持续集成
- 【持续集成CI】mac系统下安装jenkins环境
- 构建持续集成环境: jenkis + github + maven (Continuous Integration)CI 持续集成
- CI 持续集成: Jenkins + Maven + Tomcat+ Jacoco
- Maven系列四:持续集成:Jenkins-CI
- Redhat上为java Maven项目构建基于Jenkins + Github的持续集成环境
- jenkins maven testng selenium自动化持续集成
- Jenkins+Github+Docker+Maven实现持续集成
- 软件项目管理(二)——用jenkins持续集成、Maven、Github的使用
- windows下使用Jenkins搭建CI持续集成平台(版本源码管理使用SVN)
- Windows系统下:jenkins+selenium+TestNG一步搞定简单自动化持续集成
- 【mac+Android Studio】【持续集成优化】搭建Jenkins+svn+Android Studio+发布到蒲公英+发邮件
- CI持续集成系统环境--Gitlab+Gerrit+Jenkins完整对接
- Jenkins+Maven+SVN快速搭建持续集成环境
- 基于Jenkins和Github的持续集成环境安装与学习
- 老李分享:持续集成学好jenkins之Git和Maven配置
- Jenkins + testNg + maven 项目持续集成
- Jenkins+Git+Maven+Shell+Tomcat持续集成