##web.xml:
<context-param>
<param-name>email</param-name>
<param-value>[email protected]</param-value>
<context-param>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="locations" value="classpath:zookeeper.properties"/> | |
</bean> |
##web.xml:
<context-param>
<param-name>email</param-name>
<param-value>[email protected]</param-value>
<context-param>
Handlebars是JavaScript一个语义模板库,通过对view和data的分离来快速构建Web模板。它采用"Logic-less template"(无逻辑模版)的思路,在加载时被预编译,而不是到了客户端执行到代码时再去编译, 这样可以保证模板加载和运行的速度。Handlebars兼容Mustache,你可以在Handlebars中导入Mustache模板。
Handlebars的安装非常简单,你只需要从Github下载最新版本,你也可访问下面网址获取最新信息:http://handlebarsjs.com。 目前handlebars.js已经被许多项目广泛使用了,handlebars是一个纯JS库,因此你可以像使用其他JS脚本一样用script标签来包含handlebars.js
task '_check.libversions'(description: 'check all dependencys version!') << { | |
def checked = [:] | |
allprojects { | |
configurations.each { configuration -> | |
configuration.allDependencies.each { dependency -> | |
def version2 = dependency.version | |
if(version2!=null && !version2.contains('SNAPSHOT') && !checked[dependency]) { | |
def group = dependency.group | |
def name = dependency.name | |
def url = "http://search.maven.org/solrsearch/select?q=g:%22${group}%22%20a:%22${name}%22&wt=mxl" |
import org.apache.tools.ant.taskdefs.condition.Os | |
if (Os.isFamily(Os.FAMILY_WINDOWS)) { | |
} else { | |
} |
task svninfo << { | |
new ByteArrayOutputStream().withStream { os -> | |
def result = exec { | |
executable = 'svn' | |
args = ['info'] | |
standardOutput = os | |
} | |
def outputAsString = os.toString() | |
def matchLastChangedRev = outputAsString =~ /Last Changed Rev: (\d+)/ | |
println "Latest Changed Revision #: ${matchLastChangedRev[0][1]}" |
$('.postTitle').each(function(p){ | |
//向后*nextAll*或向前*prevAll* | |
$(this).attr('data-date', $(this).nextAll('.postDesc').eq(0).text() ) | |
}) | |
<!-- 引用 --> | |
<context:property-placeholder ignore-resource-not-found="true" | |
location="classpath*:/application.properties,classpath*:/application.development.properties"/> | |
//${key:defaultValue} | |
@RequestMapping("${sys.user:/adm/user}" ) |
<mvc:annotation-driven ignoreDefaultModelOnRedirect="true" /> |