webx中的pull service
来源:互联网 发布:投影机写码软件 编辑:程序博客网 时间:2024/06/05 23:36
(1)概述
1.pull service作用
实际上pull service就相当于提供工具类,可以将工具定义成java类,而能够在vm模板中调用
2.webx定义的pull service
<services:pull> <!-- Webx3 tools。 --> <pull-factories:utils /> <pull-factories:rundata-tool /> <pull-factories:csrfToken /> <pull-factories:form-tool /> <pull-factories:control-tool /> <pull-factories:uris-tool /> </services:pull>
(2)自定义PullService
1.定义工具类
public class DomTool { public void addScript(String scriptURI) { } public void addCss(String cssURI) { } }
2.实现ToolFactory接口
public class MyToolFactory implements ToolFactory { private boolean singleton = true; private DomTool tool; public void setSingleton(boolean singleton) { this.singleton = singleton; } public Object createTool() throws Exception { if (this.singleton) { if (tool == null) { tool = new DomTool(); } return tool; } else { return new DomTool(); } } public boolean isSingleton() { return this.singleton; }}
3.暴露服务工具
<services:pull> <pull-factories:factory id="domTool" class="com.alibaba.sample.petstore.web.common.util.MyToolFactory" /> </services:pull>
4.vm中使用
$domTool.addScript("scripts/test.js");
0 0
- webx中的pull service
- webx-pull service
- Webx中的uris
- note4.webx 2.x之some service
- webx集成测试之service层测试
- webX
- Webx
- webx
- android中的pull解析
- github 中的pull request
- github中的pull request
- xml中的pull解析
- webx- webx framework
- Webx-webx turbine
- Git中的fetch和pull
- Git中的fetch和pull
- git中的fetch和pull
- Git中的fetch和pull
- opencv 循环读取多张图片
- Cross compile valgrind
- iOS健康数据分析
- iOS调用系统相册,相机上传头像的基本技巧
- 6 Object类、StringBuffer、StringBuilder
- webx中的pull service
- 最简单的基于FFmpeg的AVDevice例子(屏幕录制)
- hdu1757——矩阵快速幂入门
- iOS开发,图片制作水印,图片裁剪,图片条纹背景,图片截图,以及将图片成文件存储。基于Quartz2D技术
- Managing the server
- java提高篇(二四)-----HashSet
- mysql查询的小东西
- iOS给UIView添加延展使用与Button、uiview。。。
- codeforces 617e