`
dean_liu
  • 浏览: 75233 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
Handler Mapping The HandlerMapping strategy is used to map the HTTP client request to some handler controller and/or method. This is done based on the request URL and the HTTP method, but may also include the request parameters, request headers, or other custom factors.   HandlerMapping Strategy ...
Q: So the accept header tells the server the mime-type of the resource the browser is looking for. For example, the server can send plain text, html, json, etc. Ok that makes sense. But then I look at the content-type header and it looks to be doing the same thing. For example, it tells the server th ...
转自:http://www.cnblogs.com/anjey/archive/2012/04/13/2445430.html 首先还是从很热门的实例parseInt("09")==0说起。 parseInt(number,type)这个函数后面如果不跟第2个参数来表示进制的话,默认是10进制。 比如说parseInt("010",10)就是10进 ...
方法一: Ext.apply(Ext.getCmp('anyId'), {your config object}); 方法二: myField.allowBlank = true; myField.validateValue(myField.getValue()); //force update 参考: http://stackoverflow.com/questions/6098596/how-to-adding-fields-config-on-the-fly http://www.sencha.com/learn/form-faq#Set_allowBlank_dyn ...
Spring Security版本:2.0.5 重写org.springframework.security.ui.webapp.AuthenticationProcessingFilter: package com.cay.core.web; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRespons ...
Spring Security版本:2.0.5 应用场景: 用户登录系统,进行录入操作,长时间未保存,当会话超时后,用户进行保存(通过AJAX请求),系统提示“会话超时请重新登录”。 Spring Security目前的行为: Spring Security实际上是把这种请求当成未登录的请求,并抛出不允许访问的异常(org.springframework.security.AccessDeniedException),然后请求重定向到登录页面。 相关的方法有: org.springframework.security.ui.ExceptionTranslationFilter.doFil ...

Spring Security国际化

    博客分类:
  • Java
Spring Security版本:2.0.5 取出Spring Security的异常信息 ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message} 异常信息已经经过国际化处理,所以只要直接取出异常的message属性即可。 如在org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(Authentication)中: ... try { ...
引用 cd /var/log lsof messages 引用 COMMAND    PID USER   FD   TYPE DEVICE   SIZE/OFF NODE NAME rsyslogd  1455 root    4w   REG    8,6 1299113404 2686 messages abrt-dump 1932 root    4r   REG    8,6 1299113404 2686 messages 引用 kill -9 1455 kill -9 1932 引用 cat /dev/null > /var/log/messages rebo ...
1.failoverNodes (optional, must not be used for non-sticky sessions) This attribute must contain the ids of the memcached nodes, that shall not be used by this tomcat for session backup, but only if no other memcached nodes are available. Therefore, you should list those memcached nodes, that are run ...

Nginx均衡器配置

vim /usr/local/nginx/nginx.conf 1.在server节点上面增加以下节点: 引用upstream backend{ ip_hash; server 192.168.73.206:8080; server 192.168.73.207:8080; } 2.找到: 引用location / {  root   html;  index  index.html index.htm;  } 改成: 引用location / { proxy_pass http://backend; proxy_redirect default; proxy_connect_timeo ...

[转]Nginx安装

原文:http://www.nginx.cn/install nginx可以使用各平台的默认包来安装,本文是介绍使用源码编译安装,包括具体的编译参数信息。 正式开始前,编译环境gcc g++ 开发库之类的需要提前装好,这里默认你已经装好。 ububtu平台编译环境可以使用以下指令 apt-get install build-essential apt-get install libtool cento平台编译环境使用如下指令 安装make: yum -y install gcc automake autoconf libtool make 安装g++: yum install gc ...
1.节点A mkdir -p /etc/keepalived/ vi /etc/keepalived/keepalived.conf global_defs { notification_email { admin@example.com } notification_email_from admin@ptp.cn smtp_server 127.0.0.1 stmp_connect_timeout 30 router_id HA_1 } vrrp_instance VMH1 { state MASTER interface eth0 virtual_rout ...

安装keepalived

keepalived:http://www.keepalived.org/index.html 引用 它是一个基于VRRP协议来实现的WEB服务高可用方案,可以利用其来避免单点故障。一个WEB服务至少会有2台服务器运行Keepalived,一台为主服务器(MASTER),一台为备份服务器(BACKUP),但是对外表现为一个虚拟IP,主服务器会发送特定的消息给备份服务器,当备份服务器收不到这个消息的时候,即主服务器宕机的时候,备份服务器就会接管虚拟IP,继续提供服务,从而保证了高可用性。(摘) 1.安装ipvsadm yum -y install ipvsadm 或者 wget http ...
原谅地址:http://www.cnblogs.com/jjkv3/archive/2012/11/14/2769613.html 场景: vmware workstation 8, guest OS:CentOS 6.2. Host OS:windows 7 问题: 克隆RHEL 6.3 后网卡名字有两个eth0和eth1,实际起作用的是eth1,eth0是克隆过来的。 由于克隆后mac地址会重新生成一个,因此系统会在原来的eth0上以为加了一个网卡因此+1为eth1. 处理办法。 方法一: 1.root登录,cp /etc/udev/rules.d/70-persisten ...
分别在两台服务器中安装libevent与repcached memcached 一、安装libevent 1.先用:ls -al /usr/lib | grep libevent  查看是否已安装,如果已安装且版本低于1.3,则先通过:rpm -e libevent —nodeps 进行卸载。 2.下载libevent安装包:libevent-1.4.13-stable.tar.gz,然后解压。 3.切换到解压后的 libevent 主目录:cd libevent-1.4.13-stable 4.依次执行: ./configure --prefix=/usr (或 ./conf ...
Global site tag (gtag.js) - Google Analytics