- 浏览: 138810 次
最新评论
-
xlaohe1:
controller返回的是一个POJO对象,然后用@Resp ...
Spring MVC 4.X ResponseBody 日期类型Json 处理 -
TRAMP_ZZY:
能帮到你,我也很高兴。
Spring MVC 4.X ResponseBody 日期类型Json 处理 -
jobzjc:
第一段有帮到我。如果是非对象,Object方式传递的时候,第一 ...
Spring MVC 4.X ResponseBody 日期类型Json 处理 -
TRAMP_ZZY:
dingran 写道为什么,我怎么就没找到System > ...
Ubuntu 12.04 设置 IBus 开机启动 -
dingran:
为什么,我怎么就没找到System >> Pref ...
Ubuntu 12.04 设置 IBus 开机启动
文章列表
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 ...
<?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;
/**
...
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
# 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 ...
$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 javadoc 插件控制台输出乱码
- 博客分类:
- Maven
Maven 控制台输出默认采用的是GBK 编码。需要这是环境变量为UTF-8。
run -> run configurations