`
TRAMP_ZZY
  • 浏览: 138810 次
社区版块
存档分类
最新评论
文章列表
Spring MVC 本地化解析 1. 本地化概述 一般来说,Spring MVC 根据Http Headers 报文的Accept-Language 参数发送到服务器端,服务器根据该参数判断用户客户端的本地化类型。 Spring MVC 通过Session 或Cookie 的方式指定本地化信息。通史会在上下文中寻找本地化解析器(LocaleResolver) 实例,找到后使用它获取本地化类型信息。 2. 默认的本地化解析器(AcceptHeaderLocaleResolver)Spring MVC 默认装在该类型解析器,根据Accept-Language 字段判断用户的本地化类型。 3. ...
Python 字符串反转 1. Python 字符转切片实现 name = tramp print name[::-1] 2. Python 递归实现 def reverse(aStr): """reverse a string""" if len(aStr) == 0: return aStr newStr = reverse(aStr[1:]) + aStr[0] return newStr
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate"> <property name="messageConverters"> <list> <bean id="jsonHttpMessageConverter" class="org.springframework.http.conve ...
package org.anicloud.concurrency; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; /** * Created by zhaoyu on 15-4-9. */ class ExceptionThread2 implements Runnable { @Override public void run() { ...
Java Comparable 和 Comparator 比较 1. 代码实现 package org.anicloud.colletion; import java.util.Arrays; import java.util.Comparator; /** * Created by zhaoyu on 15-4-1. */ class User implements Comparable<User> { private String id; private int age; User(String id, in ...

Maven 运行jar

    博客分类:
  • Java
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd& ...
echo "# worker-bee" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:anicloud/worker-bee.git git push -u origin master git remote add origin git@github.com:anicloud/worker-bee.git git push -u origin master
angularjs 校验密码字段一致性 directives.directive('pwCheck', function () { return { require: 'ngModel', link: function (scope, elem, attrs, ctrl) { var firstPassword = '#' + attrs.pwCheck; // 网上好多例子都掉了$(elem) 美元符号和括号 $(elem).add(firstPassword).o ...
play framework(v2.3.7) 集成Eean,不支持@OneToMany 生成中间表。 这是Ebean 实现JPA 标准的一个BUG。参见:https://github.com/ebean-orm/avaje-ebeanorm/issues/123 package models; import play.db.ebean.Model; import javax.persistence.*; import java.util.ArrayList; import java.util.Date; import java.util.List; /** ...

Java 回调

    博客分类:
  • Java
public interface CallBack { public void solve(String result); } public class Wang implements CallBack { public String result; private Li li; public Wang(Li li) { this.li = li; } @Override public void solve(String result) { this.re ...
  http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html   http://lixor.iteye.com/blog/1532655   http://www.oschina.net/question/12_23148  
Eclipse中Cannot find any provider supporting DES解决之道 http://blog.csdn.net/darwinchina/article/details/12037999

Redis 配置文件

# By default Redis does not run as a daemon. Use 'yes' if you need it. # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. #Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize no # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. Y ...

Redis 基本命令

$dir: /usr/local/redis/redis-2.8.13 start sever:  cd $dir src/redis-server src/redis-cli stop server: pkill redis-server commands : keys * 将Redis 作为Linux 服务随机启动 vi /ect/rc/local 在其中添加一行代码 /usr/local/redis/redis-2.8.13/src/redis-server 配置Redis 配置文件名称:redis.conf 常用命令: del name 删除键 exist ...
Maven 控制台输出默认采用的是GBK 编码。需要这是环境变量为UTF-8。 run -> run configurations
Global site tag (gtag.js) - Google Analytics