自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

面朝大海,春暖花开

IN IT && WIN IT

  • 博客(33)
  • 资源 (1)
  • 收藏
  • 关注

转载 Failed to load class "org.slf4j.impl.StaticLoggerBinder"

Failed to load class-org.slf4j.impl.StaticLoggerBinder使用最新的logback日志的时候报错,错误:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger impleme...

2018-07-28 08:26:29 625

转载 java对象初始化顺序

java对象初始化顺序直接上测试吧: Father.java: public class Father { private static Property FatherStaticProp = new Property("调用Father的静态属性"); private Property FatherNonStaticProp = new Property(...

2018-07-24 08:45:40 288

转载 redis实现自动补全

redis实现自动补全自动补全,首先脑袋里想到的是冒出一句sqlselect * from t_table where key like key_word%,而且需要实时通过调用ajax每次访问数据库。。。。显然是不太优雅,了解到redis中的sorted set的属性,可以自动给排序实现看一波: 127.0.0.1:6379> zadd zset 0 a(int...

2018-07-22 21:14:18 655

转载 消息过期通知-reids keyspace notifications

消息过期通知-reids keyspace notifications了解到使用reids中keyspace notifications功能可以实现消息过期通知打开redis中keyspace notifications功能默认情况下,redis中的keyspace notifications功能是关闭的,打开这个功能也非常简单。打开redis.conf文件,找到nofity-ke...

2018-07-22 17:20:06 1183

转载 mybatis中拦截器执行顺序

mybatis中拦截器执行顺序拦截器初始化在org.apache.ibatis.builder.xml.XMLConfigBuilder中: private void pluginElement(XNode parent) throws Exception { if (parent != null) { for (XNode child : parent.getC...

2018-07-19 08:48:47 13929 3

转载 设置滚动条样式

设置滚动条样式网上找的不错的滚动条样式: /*滚动条样式*/.divClass::-webkit-scrollbar {/*滚动条整体样式*/ width: 4px; /*高宽分别对应横竖滚动条的尺寸*/ height: 4px;}.divClass::-webkit-scrollbar-thumb {/*滚动条里面小方块*/ border-ra...

2018-07-18 08:46:33 465

翻译 客户端与Zookeeper Service建立会话

客户端与Zookeeper Service建立会话摘自《apache zookeeper essentials》客户端可以连接到配置了很多服务器的Zookeeper集群,客户端尝试连接服务器列表中的随机的一台,如果连接失败,它会尝试连接下一台服务器,以此类推。直到所有的服务器都被尝试过或者已经成功建立了连接一旦客户端与服务器建立了连接,服务器和客户端之间就创建了一次会话(session...

2018-07-16 21:54:03 1226

转载 jq中each方法的continue和break

jq中each方法的continue和break有时候使用jq中的each方法遍历的时候,总想要有for语句和while循环语句的continue和break的功能,其实jQ中是有的其中:在jq的each方法中使用return false,相当于break的意思在jq的each方法中使用return true,相当于continue的意思案例$(function ...

2018-07-16 20:55:59 5202 3

转载 jedis-Cannot open Redis connection due invalid URI

jedis:Cannot open Redis connection due invalid URI在使用spring和redis整合的时候,突然冒出这样的问题配置config.properties: #redis的服务器地址redis.host=165.254.189.78#redis的服务端口redis.port=6379#密码redis.pass=#链接...

2018-07-15 10:27:25 4049 2

转载 Could not get a resource from the pool

Could not get a resource from the pool配置#redis的服务器地址redis.host=165.254.189.78#redis的服务端口redis.port=6379#密码redis.pass=#链接数据库redis.default.db=0#客户端超时时间单位是毫秒redis.timeout=100000#最大连接数r...

2018-07-15 10:26:28 1421

翻译 Zookeeper Service运行模式

Zookeeper Service运行模式摘自《apache zookeeper essentials》ZooKeeper Service工作图: ZooKeeper Service可以以两种模式运行: standlone和quorum,standlone模式中只有一台ZooKeeper Server;quorum模式是指Zookeeper以复制性模式运行在集群机器之中,也被称为...

2018-07-14 15:26:27 1450

翻译 ZooKeeper统计结构(stat structure)

ZooKeeper统计结构(stat structure)摘自《apache zookeeper essentials》在Zookeeper命名空间中的每个znode都有一个与之相关的统计结构(stat structure),和linux/unix文件系统中广文件的统计结构相似。znode的统计结构中的属性有着各自的意义: cZxid: 创建znode的更改的事务IDmZxid:...

2018-07-14 10:54:07 3378

转载 ZooKeeper访问控制列表(ACL)

ZooKeeper访问控制列表(ACL)摘自《apache zookeeper essentials》ZooKeeper数据模型提供了一种机制,就是使用ACL去控制访问znode的ACL。在创建znode的时候,ACL就决定了你对znode的权限相关的各种操作。ZooKeeper的ACL模型和linux/unix中的文件权限中允许和阻止操作相似,通过设置权限位作用在znode上。但是Zoo...

2018-07-14 09:12:59 2235

翻译 ZooKeeper操作

ZooKeeper操作摘自《apache zookeeper essentials》ZooKeeper数据模型和支持的API: Operation Description create 创建Zookeeper命名空间路径的znode delete 删除Zookeeper命名空间路径的znode exists 校验znode是否在...

2018-07-14 08:23:12 402

转载 js-复选框添加移除数据

js-复选框添加移除数据场景在做带有复选框分页的时候,会有一段点击复选框添加数据,再次点击就移除的逻辑//Jquery环境//list = [];function addCheckBoxData(list, item){ if($.inArray(item, list) == -1){ list.push(item); }else{ ...

2018-07-13 09:13:57 1476

转载 js - cannot set property xxx of undefined

js - cannot set property xxx of undefinedusers.bucketList = [];var td_id=0var bucket = users.bucketList[td_id];if (bucket == null || bucket == '' || bucket == 'undefined'){ // users.bucketL...

2018-07-13 09:03:46 80704

翻译 ZooKeeper监视(Watches)-时刻关注znode的变化

ZooKeeper监视(Watches)-时刻关注znode的变化摘自《apache zookeeper essentials》通常客户端访问该服务是通过轮询或者是拉取的模式,在大型的复杂的分布式系统中,使用拉取模式会遇到可扩展性的问题。为了解决这个问题,ZooKeeper的设计者们实现了这样的一种机制,客户端可以获取ZooKeeper Service而不是通过轮询的方式,这很像推送的模式...

2018-07-12 21:53:00 878

转载 jpa实体关系-一对一

jpa实体关系-一对一jpa实体关系中一对一分成两种:单向一对一和双向的一对一单向的一对一映射Employee和ParkingSpace是一对一的关系@Entitypublic class Employee { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id;...

2018-07-12 09:10:24 2022

转载 jpa实体关系-一对多

jpa实体关系-一对多双向一对多映射如一个Department中有多个Employeem,而一对多的关系往往是双向的@Entitypublic class Employeem { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; private Stri...

2018-07-12 09:08:51 683

翻译 ZooKeeper的数据模型

ZooKeeper的数据模型摘自《apache zookeeper essentials》维基中这样定义Zookeeper,ZooKever允许分布式进程通过数据寄存器的共享层次命名空间进行相互协调。这个命名空间和Unix文件系统非常相似,如图: 可以看到znode是分层次管理的,更像是一棵树,或者是标准的文件系统,一些关键点: 根结点只有一个child znode叫/z...

2018-07-11 21:03:34 763

转载 mysql问题_too_many_connections

mysql问题-“Too many connections”线上程序报了个错: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many c...

2018-07-11 08:53:55 252

转载 ThreadPoolTaskExecutor配置问题

ThreadPoolTaskExecutor配置问题最近线上出现一个奇葩问题,使用的是ThreadPoolTaskExecutor来处理后续服务调用,刚开始运行ThreadPoolTaskExecutor处理后续服务调用是没有问题的,但是一段时间之后,发现后续服务一直没有被调用,导致了极其严重的后果有关spring中ThreadPoolTaskExecutor具体如下: <...

2018-07-10 08:47:46 11045

翻译 鸟瞰Zookeeper_Service

鸟瞰Zookeeper Service摘自《apache zookeeper essentials》正如您所知道的,Apache ZooKeeper是给分布式应用(distributed application)提供协调服务(coordination service)的。目的就是为了解决分布式应用中组件间协调等相关困难的问题。它确实暴露了一些强大的原始接口,应用程序可以通过实现ZooKee...

2018-07-09 20:32:05 154

转载 linux中安装单机版zookeeper集群服务

linux中安装单机版zookeeper集群服务创建配置文件首先在zookeeper安装目录下的conf目录下创建3个配置文件zoo1.cfg,zoo2.cfg,zoo2.cfg,这三个配置文件差不多,只是有一点微小的差别,我的目录是/opt/soft/zookeeper-3.4.12/conf [root@localhost conf]# tree.├── config...

2018-07-08 08:17:28 184

转载 linux中安装zookeeper

linux中安装zookeeper获取zookeeper下载地址http://mirror.bit.edu.cn/apache/zookeeper/stable/zookeeper-3.4.12.tar.gz[root@localhost ~]# wget http://mirror.bit.edu.cn/apache/zookeeper/stable/zookeeper-3....

2018-07-08 07:47:48 227

转载 spring-security(七)

spring-security(七)摘自《pro spring security》基于spring security 4.2.2.RELEASESecurityContext and SecurityContextHolderorg.springframework.security.core.context.SecurityContext(实际上是它的实现类SecurityCont...

2018-07-07 08:42:49 212

转载 spring-security(六)

spring-security(六)摘自《pro spring security》基于spring security 4.2.2.RELEASE认证对象(The Authentication Object)Authentication object就是登陆到系统的对象的一种抽象。大体来讲,像用户(user),通常只有用户需要认证。Authentication object在spri...

2018-07-05 22:30:17 479

转载 spring-security(五)

spring-security(五)摘自《pro spring security》基于spring security 4.2.2.RELEASEConfigAttributeorg.springframework.security.access.ConfigAttribute接口封装了可访问的受保护资源中的元数据(metadata),如ROLE_ADMIN就是一个ConfigAtt...

2018-07-04 21:58:53 283

转载 linux安装redis

linux安装redis获取redisredis下载地址: (https://redis.io/download)[https://redis.io/download]$ wget http://download.redis.io/releases/redis-4.0.10.tar.gz$ tar xzf redis-4.0.10.tar.gz$ cd redis-4.0....

2018-07-04 08:54:09 3681

转载 spring-security(四)

spring-security(四)摘自《pro spring security》基于spring security 4.2.2.RELEASE过滤器链机制(The Filters and Filter Chain)spring security就是使用过滤器链机制模式去保护web应用安全的,而这个模式是基于标准的servlet filter功能之上实现的。像拦截器模式(Inter...

2018-07-03 21:23:36 133

转载 spring-security(三)

spring-security(三)基于spring security 4.2.2.RELEASEXML命名空间(The XML Namespace在spring框架中尤为值得提倡和使用。主要是了解命名空间解析的流程: xsd文件定义了特殊的xml结构spring.schemas中指定了基于URL的schema与xsd文件地址的映射关系spring.handlers文件...

2018-07-02 23:09:09 170

转载 spring-security(二)

spring-security(二)基于spring security 4.2.x.RELEASEAbstractSecurityInterceptorspring security框架中非常重要的组成部分就是AbstractSecurityInterceptor。AbstractSecurityInterceptor的两个重要的实现FilterSecurityIntercepto...

2018-07-02 20:40:25 267

转载 spring-security(一)

spring-security(一)基于spring security 4.2.2.RELEASE鸟瞰spring security在走进spring security之前,需要了解的一些components: AbstractSecurityInterceptorXml NameSpaceDelegatingFilterProxy(Filter Chains)C...

2018-07-01 14:46:40 148

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除