- 浏览: 2600499 次
- 来自: 杭州
文章分类
- 全部博客 (1190)
- webwork (4)
- 网摘 (18)
- java (104)
- hibernate (1)
- Linux (85)
- 职业发展 (1)
- activeMQ (2)
- netty (15)
- svn (1)
- webx3 (12)
- mysql (81)
- css (1)
- HTML (6)
- apache (3)
- 测试 (2)
- javascript (1)
- 储存 (1)
- jvm (5)
- code (13)
- 多线程 (12)
- Spring (18)
- webxs (2)
- python (119)
- duitang (0)
- mongo (3)
- nosql (4)
- tomcat (4)
- memcached (20)
- 算法 (28)
- django (28)
- shell (1)
- 工作总结 (5)
- solr (42)
- beansdb (6)
- nginx (3)
- 性能 (30)
- 数据推荐 (1)
- maven (8)
- tonado (1)
- uwsgi (5)
- hessian (4)
- ibatis (3)
- Security (2)
- HTPP (1)
- gevent (6)
- 读书笔记 (1)
- Maxent (2)
- mogo (0)
- thread (3)
- 架构 (5)
- NIO (5)
- 正则 (1)
- lucene (5)
- feed (4)
- redis (17)
- TCP (6)
- test (0)
- python,code (1)
- PIL (3)
- guava (2)
- jython (4)
- httpclient (2)
- cache (3)
- signal (1)
- dubbo (8)
- HTTP (4)
- json (3)
- java socket (1)
- io (2)
- socket (22)
- hash (2)
- Cassandra (1)
- 分布式文件系统 (5)
- Dynamo (2)
- gc (8)
- scp (1)
- rsync (1)
- mecached (0)
- mongoDB (29)
- Thrift (1)
- scribe (2)
- 服务化 (3)
- 问题 (83)
- mat (1)
- classloader (2)
- javaBean (1)
- 文档集合 (27)
- 消息队列 (3)
- nginx,文档集合 (1)
- dboss (12)
- libevent (1)
- 读书 (0)
- 数学 (3)
- 流程 (0)
- HBase (34)
- 自动化测试 (1)
- ubuntu (2)
- 并发 (1)
- sping (1)
- 图形 (1)
- freemarker (1)
- jdbc (3)
- dbcp (0)
- sharding (1)
- 性能测试 (1)
- 设计模式 (2)
- unicode (1)
- OceanBase (3)
- jmagick (1)
- gunicorn (1)
- url (1)
- form (1)
- 安全 (2)
- nlp (8)
- libmemcached (1)
- 规则引擎 (1)
- awk (2)
- 服务器 (1)
- snmpd (1)
- btrace (1)
- 代码 (1)
- cygwin (1)
- mahout (3)
- 电子书 (1)
- 机器学习 (5)
- 数据挖掘 (1)
- nltk (6)
- pool (1)
- log4j (2)
- 总结 (11)
- c++ (1)
- java源代码 (1)
- ocr (1)
- 基础算法 (3)
- SA (1)
- 笔记 (1)
- ml (4)
- zokeeper (0)
- jms (1)
- zookeeper (5)
- zkclient (1)
- hadoop (13)
- mq (2)
- git (9)
- 问题,io (1)
- storm (11)
- zk (1)
- 性能优化 (2)
- example (1)
- tmux (1)
- 环境 (2)
- kyro (1)
- 日志系统 (3)
- hdfs (2)
- python_socket (2)
- date (2)
- elasticsearch (1)
- jetty (1)
- 树 (1)
- 汽车 (1)
- mdrill (1)
- 车 (1)
- 日志 (1)
- web (1)
- 编译原理 (1)
- 信息检索 (1)
- 性能,linux (1)
- spam (1)
- 序列化 (1)
- fabric (2)
- guice (1)
- disruptor (1)
- executor (1)
- logback (2)
- 开源 (1)
- 设计 (1)
- 监控 (3)
- english (1)
- 问题记录 (1)
- Bitmap (1)
- 云计算 (1)
- 问题排查 (1)
- highchat (1)
- mac (3)
- docker (1)
- jdk (1)
- 表达式 (1)
- 网络 (1)
- 时间管理 (1)
- 时间序列 (1)
- OLAP (1)
- Big Table (0)
- sql (1)
- kafka (1)
- md5 (1)
- springboot (1)
- spring security (1)
- Spring Boot (3)
- mybatis (1)
- java8 (1)
- 分布式事务 (1)
- 限流 (1)
- Shadowsocks (0)
- 2018 (1)
- 服务治理 (1)
- 设计原则 (1)
- log (0)
- perftools (1)
最新评论
-
Aqu415:
,默认是netty还是hassion?
dubbo入门 -
siphlina:
课程——基于Python数据分析与机器学习案例实战教程分享网盘 ...
Python机器学习库 -
san_yun:
leibnitz 写道hi,我想知道,无论在92还是94版本, ...
hbase的行锁与多版本并发控制(MVCC) -
leibnitz:
hi,我想知道,无论在92还是94版本,更新时(如Puts)都 ...
hbase的行锁与多版本并发控制(MVCC) -
107x:
不错,谢谢!
Latent Semantic Analysis(LSA/ LSI)算法简介
velocity配置详解
在velocity二方包中有一个velocity.properties
文件定义了velocity的配置信息(位于org.apache.velocity.runtime.defaults package下,org.apache.velocity.runtime.RuntimeConstants中定义了key值)
#模板编码:
input.encoding=ISO-8859-1 //模板输入编码
output.encoding=ISO-8859-1 //模板输出编码
#foreach配置
directive.foreach.counter.name = velocityCount //计数器名称
directive.foreach.counter.initial.value = 1 //计数器初始值
directive.foreach.maxloops = -1
//最大循环次数,-1为默认不限制 directive.foreach.iterator.name = velocityHasNex
//迭代器名称
#set配置
directive.set.null.allowed = false //是否可设置空值
#include配置
directive.include.output.errormsg.start = <!-- include error : //错误信息提示开始字符串
directive.include.output.errormsg.end = see error log --> //错误信息提示结束字符串
#parse配置
directive.parse.max.depth = 10 //解析深度
模板加载器配置
resource.loader = file //模板加载器类型,默认为文件,可定义多个
file.resource.loader.description = Velocity File Resource Loader //加载器描述
file.resource.loader.class = Velocity.Runtime.Resource.Loader.FileResourceLoader //加载器类名称
file.resource.loader.path = . //模板路径
file.resource.loader.cache = false //是否启用模板缓存
file.resource.loader.modificationCheckInterval = 2 //检查模板更改时间间隔
宏配置
velocimacro.permissions.allow.inline = true //是否可以行内定义
velocimacro.permissions.allow.inline.to.replace.global = false //是否可以用行内定义代替全局定义
velocimacro.permissions.allow.inline.local.scope = false //行内定义是否只用于局部
velocimacro.context.localscope = false //宏上下文是否只用于局部
velocimacro.max.depth = 20 //解析深度
velocimacro.arguments.strict = false //宏参数是否启用严格模式
资源管理器配置
resource.manager.class = Velocity.Runtime.Resource.ResourceManagerImpl //管理器类名称
resource.manager.cache.class = Velocity.Runtime.Resource.ResourceCacheImpl //缓存器类名称
解析器池配置
parser.pool.class = Velocity.Runtime.ParserPoolImpl //解析池类名称
parser.pool.size = 40 //初始大小
#evaluate配置
directive.evaluate.context.class = Velocity.VelocityContext //上下问类名称
可插入introspector配置
runtime.introspector.uberspect = Velocity.Util.Introspection.UberspectImpl //默认introspector类名称
更详细的可以参考:Velocity的控制讨论
velocity.properties
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License" ); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ---------------------------------------------------------------------------- # R U N T I M E L O G # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- # default LogChute to use: default : AvalonLogChute, Log4JLogChute, CommonsLogLogChute, ServletLogChute, JdkLogChute # ---------------------------------------------------------------------------- runtime.log.logsystem.class = org.apache.velocity.runtime.log.AvalonLogChute,org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute # --------------------------------------------------------------------------- # This is the location of the Velocity Runtime log. # ---------------------------------------------------------------------------- runtime.log = velocity.log # ---------------------------------------------------------------------------- # This controls whether invalid references are logged. # ---------------------------------------------------------------------------- runtime.log.invalid.references = true # ---------------------------------------------------------------------------- # T E M P L A T E E N C O D I N G # ---------------------------------------------------------------------------- input.encoding=ISO-8859-1 output.encoding=ISO-8859-1 # ---------------------------------------------------------------------------- # F O R E A C H P R O P E R T I E S # ---------------------------------------------------------------------------- # These properties control how the counter is accessed in the #foreach # directive. By default the reference $velocityCount and $velocityHasNext # will be available in the body of the #foreach directive. # The default starting value for $velocityCount is 1. # ---------------------------------------------------------------------------- directive.foreach.counter.name = velocityCount directive.foreach.counter.initial.value = 1 directive.foreach.maxloops = -1 directive.foreach.iterator.name = velocityHasNext # ---------------------------------------------------------------------------- # S E T P R O P E R T I E S # ---------------------------------------------------------------------------- # These properties control the behavior of #set. # For compatibility, the default behavior is to disallow setting a reference # to null . This default may be changed in a future version. # ---------------------------------------------------------------------------- directive.set.null .allowed = false # ---------------------------------------------------------------------------- # I F P R O P E R T I E S # ---------------------------------------------------------------------------- # These properties control the behavior of #if # Default behavior is to check return value of toString() and treat an object # with toString() that returns null as null . If all objects have toString() # methods that never return null , this check is unnecessary and can be disabled # to gain performance. In Velocity 1.5, no such null check was performed. directive.if .tostring.nullcheck = true # ---------------------------------------------------------------------------- # I N C L U D E P R O P E R T I E S # ---------------------------------------------------------------------------- # These are the properties that governed the way #include'd content # is governed. # ---------------------------------------------------------------------------- directive.include.output.errormsg.start = <!-- include error : directive.include.output.errormsg.end = see error log --> # ---------------------------------------------------------------------------- # P A R S E P R O P E R T I E S # ---------------------------------------------------------------------------- directive.parse.max.depth = 10 # ---------------------------------------------------------------------------- # T E M P L A T E L O A D E R S # ---------------------------------------------------------------------------- # # # ---------------------------------------------------------------------------- resource.loader = file file.resource.loader.description = Velocity File Resource Loader file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader file.resource.loader.path = . file.resource.loader.cache = false file.resource.loader.modificationCheckInterval = 2 # ---------------------------------------------------------------------------- # VELOCIMACRO PROPERTIES # ---------------------------------------------------------------------------- # global : name of default global library. It is expected to be in the regular # template path. You may remove it (either the file or this property) if # you wish with no harm. # ---------------------------------------------------------------------------- # velocimacro.library = VM_global_library.vm velocimacro.permissions.allow.inline = true velocimacro.permissions.allow.inline.to.replace.global = false velocimacro.permissions.allow.inline.local.scope = false velocimacro.context.localscope = false velocimacro.max.depth = 20 # ---------------------------------------------------------------------------- # VELOCIMACRO STRICT MODE # ---------------------------------------------------------------------------- # if true , will throw an exception for incorrect number # of arguments. false by default (for backwards compatibility) # but this option will eventually be removed and will always # act as if true # ---------------------------------------------------------------------------- velocimacro.arguments.strict = false # ---------------------------------------------------------------------------- # STRICT REFERENCE MODE # ---------------------------------------------------------------------------- # if true , will throw a MethodInvocationException for references # that are not defined in the context, or have not been defined # with a #set directive. This setting will also throw an exception # if an attempt is made to call a non-existing property on an object # or if the object is null . When this property is true then property # 'directive.set.null .allowed' is also set to true . # ---------------------------------------------------------------------------- runtime.references.strict = false # ---------------------------------------------------------------------------- # INTERPOLATION # ---------------------------------------------------------------------------- # turn off and on interpolation of references and directives in string # literals. ON by default :) # ---------------------------------------------------------------------------- runtime.interpolate.string.literals = true # ---------------------------------------------------------------------------- # RESOURCE MANAGEMENT # ---------------------------------------------------------------------------- # Allows alternative ResourceManager and ResourceCache implementations # to be plugged in. # ---------------------------------------------------------------------------- resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImpl # ---------------------------------------------------------------------------- # PARSER POOL # ---------------------------------------------------------------------------- # Selects a custom factory class for the parser pool. Must implement # ParserPool. parser.pool.size is used by the default implementation # ParserPoolImpl # ---------------------------------------------------------------------------- parser.pool.class = org.apache.velocity.runtime.ParserPoolImpl parser.pool.size = 20 # ---------------------------------------------------------------------------- # EVENT HANDLER # ---------------------------------------------------------------------------- # Allows alternative event handlers to be plugged in. Note that each # class property is actually a comma-separated list of classes (which will # be called in order). # ---------------------------------------------------------------------------- # eventhandler.referenceinsertion.class = # eventhandler.nullset.class = # eventhandler.methodexception.class = # eventhandler.include.class = # ---------------------------------------------------------------------------- # EVALUATE # ---------------------------------------------------------------------------- # Evaluate VTL dynamically in template. Select a class for the Context # ---------------------------------------------------------------------------- directive.evaluate.context.class = org.apache.velocity.VelocityContext # ---------------------------------------------------------------------------- # PLUGGABLE INTROSPECTOR # ---------------------------------------------------------------------------- # Allows alternative introspection and all that can of worms brings. # ---------------------------------------------------------------------------- runtime.introspector.uberspect = org.apache.velocity.util.introspection.UberspectImpl # ---------------------------------------------------------------------------- # SECURE INTROSPECTOR # ---------------------------------------------------------------------------- # If selected, prohibits methods in certain classes and packages from being # accessed. # ---------------------------------------------------------------------------- introspector.restrict.packages = java.lang.reflect # The two most dangerous classes introspector.restrict.classes = java.lang.Class introspector.restrict.classes = java.lang.ClassLoader # Restrict these for extra safety introspector.restrict.classes = java.lang.Compiler introspector.restrict.classes = java.lang.InheritableThreadLocal introspector.restrict.classes = java.lang.Package introspector.restrict.classes = java.lang.Process introspector.restrict.classes = java.lang.Runtime introspector.restrict.classes = java.lang.RuntimePermission introspector.restrict.classes = java.lang.SecurityManager introspector.restrict.classes = java.lang.System introspector.restrict.classes = java.lang.Thread introspector.restrict.classes = java.lang.ThreadGroup introspector.restrict.classes = java.lang.ThreadLocal
发表评论
-
Raft
2018-07-12 14:20 667前言 上篇文章说解决问题要分而治之,先把分片的问题解决了再 ... -
java uuid
2017-09-14 18:18 528在java中产生uuid的方式是使用java.util.UU ... -
JAVA 编码规范
2017-09-06 11:34 373https://google.github.io/style ... -
mac 入门
2015-12-01 16:28 591http://foocoder.com/blog/wo-zai ... -
java 反编译工具gad
2014-05-09 12:04 908java 反编译工具gad,备个份。 -
java 代码大全(code book)
2014-04-29 10:59 1002参考这里: http://www.java2s.com/C ... -
SQL语法解析器JSQLParser
2014-02-09 19:53 2069SQL 语法解释器jsqlparser 是用java ... -
BufferedInputStream 深入研究。
2013-11-19 13:26 13811. BufferedInputStream的基本原理 ... -
java 启动脚本
2013-08-22 19:08 942java 启动脚本 #!/bin/bash cmd=&q ... -
CRLF escape
2013-08-06 17:51 1160最近需要对用户输入的CRLF即(\r\n)做escape, ... -
安全的自增类
2013-07-22 18:16 942java中一个计数器如果超过MAX_VALUE再自增会如何? ... -
solr日志被block的问题
2013-05-23 16:48 1212"catalina-exec-22386" ... -
beanMapper
2013-01-13 22:43 858实在被一堆get,set搞烦了,周末写了一个beanMappe ... -
java instanceof ,isInstance(),isAssignableFrom之前的差异
2013-01-06 11:00 925public class ItemQuery { ... -
通过gzip对字符串压缩
2012-12-22 18:10 2986通过GZIPOutputStream,GZIPInputStr ... -
关于URL编码
2012-12-21 14:18 1051一、问题的由来 URL就是网址,只要上网,就一定会用到。 ... -
spring的FactoryBean机制
2012-11-20 16:18 1148spring可以通过的FactoryBean的形式把一个Fac ... -
HashMap cpu占用 100%
2012-11-10 22:22 1749今天在重现出HashMap cpu占用100%了,只 ... -
文字扫描工具--java.util.Scanner
2012-11-10 14:33 1035A simple text scanner which c ... -
一个隐形的java int溢出
2012-11-06 22:17 1021故事的背景: 笔者最近在做一个类SNS的项目, ...
相关推荐
velocity配置文件路径 struts.velocity.contexts List of Velocity context names velocity的context列表 struts.velocity.manager.classname org.apache.struts2.views.velocity.VelocityManager ...
使用Servlet或者Filter拦截请求,使用MVC的思想设计架构,使用约定,XML或 Annotation实现配置,运用Java面向对象的特点,面向抽象实现请求和响应的流程,支持Jsp,Freemarker,Velocity等视图。 JSF 优点: Java ...
Struts2属性文件详解 struts.configuration 该属性指定加载Struts 2配置文件的配置文件管理器.该属性的默认值是org.apache.Struts2.config.DefaultConfiguration, 这是Struts 2默认的配置文件管理器.如果需要实现...
spring jar 包详解 spring.jar是包含有完整发布的单个jar包,spring.jar中包含除了 spring-mock.jar里所包含的内容外其它所有jar包的内容,因为只有在开发环境下才会用到spring-mock.jar来进行辅助测试,正式应用...
最近有一个项目,还是使用的传统 MVC 模式开发,完全基于jQuery,使用了基于java模板引擎velocity,页面中嵌入了大量java语法,使得前后端...webpack 配置 基本插件 @babel/core,@babel/preset-env,babel-loader
chapter3-2-8:MyBatis注解配置详解 chapter3-2-9:使用Flyway来管理数据库版本 chapter3-2-10:使用LDAP来统一管理用户信息 chapter3-2-11:Spring Boot中增强对MongoDB的配置(连接池等) 事务管理 chapter3-3-1:...
11.Result配置详解 15 探讨type类型: 16 Type类型值 16 作用说明 16 对应类 16 chain 16 用来处理Action链 16 com.opensymphony.xwork2.ActionChainResult 16 dispatcher 16 用来转向页面,通常处理JSP 16 org....
5.3.1action详解 88 5.3.2结果与视图 91 5.3.3struts.xml的配置 94 5.4值栈与ognl表达式 100 5.5struts2的标签库 103 5.5.1控制标签 103 5.5.2数据标签 104 5.5.3表单标签 105 5.5.4非表单ui标签 107 本章...
- chapter3-2-8:[MyBatis注解配置详解](http://blog.didispace.com/mybatisinfo/) ### 事务管理 - chapter3-3-1:[使用事务管理](http://blog.didispace.com/springboottransactional/) - chapter3-3-2:[分布式...
坐标详解 9.5.2. 多模块项目 9.5.3. 项目继承 9.6. POM最佳实践 9.6.1. 依赖归类 9.6.2. 多模块 vs. 继承 9.6.2.1. 简单项目 9.6.2.2. 多模块企业级项目 9.6.2.3. 原型父项目 10. 构建生命周期 10.1...
3.3.3. bean属性及构造器参数详解 3.3.4. 使用depends-on 3.3.5. 延迟初始化bean 3.3.6. 自动装配(autowire)协作者 3.3.7. 依赖检查 3.3.8. 方法注入 3.4. bean的作用域 3.4.1. Singleton作用域 3.4.2. ...
3.3.2. 依赖配置详解 3.3.3. 使用depends-on 3.3.4. 延迟初始化bean 3.3.5. 自动装配(autowire)协作者 3.3.6. 依赖检查 3.3.7. 方法注入 3.4. Bean的作用域 3.4.1. Singleton作用域 3.4.2. Prototype作用...
3.3.2. 依赖配置详解 3.3.3. 使用depends-on 3.3.4. 延迟初始化bean 3.3.5. 自动装配(autowire)协作者 3.3.6. 依赖检查 3.3.7. 方法注入 3.4. Bean的作用域 3.4.1. Singleton作用域 3.4.2. Prototype作用...
3.3.3. bean属性及构造器参数详解 3.3.3.1. 直接量(基本类型、Strings类型等。) 3.3.3.2. 引用其它的bean(协作者) 3.3.3.3. 内部bean 3.3.3.4. 集合 3.3.3.5. Nulls 3.3.3.6. XML-based configuration metadata ...
3.3.3. bean属性及构造器参数详解 3.3.4. 使用depends-on 3.3.5. 延迟初始化bean 3.3.6. 自动装配(autowire)协作者 3.3.7. 依赖检查 3.3.8. 方法注入 3.4. bean的作用域 3.4.1. Singleton作用域 3.4.2. ...
spring jar 包详解spring.jar是包含有完整发布的单个jar包,spring.jar中包含除了 spring-mock.jar里所包含的内容外其它所有jar包的内容,因为只有在开发环境下才会用到spring-mock.jar来进行辅助测试,正式应用系统...
1. 介绍.........................................................................................................18 1.1. 关于本书...........................................................................
1. 介绍.........................................................................................................18 1.1. 关于本书..........................................................................