自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(122)
  • 收藏
  • 关注

原创 JAVA对象的内存布局

fvf

2018-09-27 00:40:49 267

原创 MyBatis初始化流程

title MyBatis初始化流程MyBatis-config.xml->+Client: reader或者InputStrean流 Client->+SqlSessionFactoryBuilder:build(inputStream) SqlSessionFactoryBuilder->+XMLConfigBuilder:new XMLConfigBuilder()...

2018-07-24 00:51:15 441

原创 Spring初始化调用的一些方法先后顺序

BeanFactoryPostProcessor postProcessBeanFactory | | | 构造函数 | | | set方法 | | | BeanPostProcessor postProcessBeforeInitialization | | | InitializingBean afterPropertiesSet | | | initM...

2018-05-21 00:58:02 670 1

原创 Spring1.0 AbstractApplicationContext refresh()时序图

websequence title Spring1.0 AbstractApplicationContext refresh()时序图 AbstractApplicationContext->+AbstractApplicationContext: refreshBeanFactory() AbstractApplicationContext->Abstract...

2018-05-19 20:22:49 325

原创 Spring1.0 初始化时序图

title Spring1.0 初始化时序图 ContextLoaderListener->+ContextLoader: initWebApplicationContext() ContextLoader->ContextLoader:createWebApplicationContext() note left of BeanUtils:初始化\nXml...

2018-05-19 14:39:26 591

原创 Spring 初始化XmlBeanFactory时序图

Spring 初始化XmlBeanFactory时序图websequence时序图 title Spring 初始化XmlBeanFactory时序图 XmlBeanFactory->+DefaultListableBeanFactory: 父类 DefaultListableBeanFactory->+AbstractAutowireCapableBean...

2018-05-19 13:48:22 650

原创 JAVA中的Pattern

以后填坑用正则中的零宽断言分为正向零宽先行断言,和负向零宽先行断言,先看一段代码: Pattern pattern = Pattern.compile("ab(?=[A-Z])"); Matcher matcher=pattern.matcher("abZW863"); if(matcher.find()){ System.out

2017-12-16 21:35:32 2335 1

原创 Spring-Core之AntPathMatcher

Spring-Core之AntPathMatcherSpring中的所有的路径都是通过AntPathMatcher来解析的,其解析是按照ant的风格的,首先,我们看看结构:

2017-12-09 01:03:16 422

原创 关于Java日志框架的问题

关于Java日志框架的问题我们在Java开发中一般都会用到日志框架,便于我们记录相关的日志信息和排错,下面介绍Java日志框架的正确合理使用。借助于SLF4J 官网上的图来说明,我们在使用日志框架时最好先使用SLF4J ,其作为日志Facade框架,不是一个真正的日志实现,而是一个抽象层( abstraction layer),允许你在后台使用任意一个日志类库,这样在客户端可以有很大的灵活性来选择真

2017-09-16 00:26:24 280

原创 关于Windows下记事本中保存编码的格式问题

关于Windows下记事本中保存编码的格式问题Windows下记事本保存文本文件的时候,可以选择不同的编码格式来保存文件,各种编码保存的文件的二进制是不同的,举例说明:我们在记事本中输入123,选择默认的编码格式,即ANSI,也就是系统默认的编码格式,简体中文版的默认编码格式为GBK,此时我们使用二进制工具打开时,其二进制形式为: 31 32 33使用Unicode编码保存,实际上,这种称呼是

2017-05-13 16:19:25 24509

原创 spring中bean的生命周期详解

本文主要介绍了spring中bean的生命周期. 下面是通过applicationContext获取bean的过程 首先,beans.xml文件配置<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://w

2017-01-23 18:34:56 533

原创 Wireshark 分析ping报文

wireshark 分析ping报文使用ping命令来获取wwww.baidu.com网站的ICPM报文,其结果如下图:可以看到,我们生成了8个报文(4个请求报文和4个应答报文),下面我们来分析第一个报文,首先,请求报文如下:对于该报文的整个描述如下:这个请求报文共74字节,其中:前14个字节分别本机的mac地址和路由器的mac地址:接下来的20个字节为ip报文:关于ip报文的格式如下:其中,ip报

2016-10-30 00:57:47 39406 2

原创 关于ServiceLoader的使用

关于ServiceLoader的使用A simple service-provider loading facility. 首先编写service接口和service provider,如下图:其中service实现(即service provider)如下:package com.test.impl;import com.test.IHello;public class HelloImpl1

2016-09-01 15:30:13 795

原创 Git pull和本地代码有冲突的解决办法

Git pull和本地代码有冲突的解决办法1.先将本地修改保存起来 git stash这样本地的所有修改就都被暂时存储起来 ,使用git stash list可以看到保存的信息。2.pull内容git pull暂存了本地修改之后,就可以pull了。3、还原暂存的内容git stash pop stash@{0}其中Updated upstream 和=====之间的内容就是pull下来的内容,==

2016-08-31 23:06:39 5290

原创 关于BigDecimal

关于BigDecimal

2016-08-31 22:53:32 341

原创 ZigZag Conversion

ZigZag ConversionThe string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H

2016-08-11 01:36:16 364

原创 字符编码

字符编码GB2312GB2312编码收录了包括拉丁字母、希腊字母、日文平假名及片假名字母、俄语西里尔字母在内的682个全角字符。GB2312编码是双字节码,也是区位码(第一个字节为“高字节”,对应94个区;第二个字节为“低字节”,对应94个位,区位码范围为0101-9494,转换为十六进制为0101-5E5E),理论上可以表示94x94=8836个字符,但是实际上并没有这么多,其中: 01

2016-03-25 14:12:01 541

原创 C语言读取文件

C语言读取文件#define _CRT_SECURE_NO_DEPRECATE#include<stdio.h>#include<stdlib.h>int main(void) { FILE *fp; char *line=NULL; size_t len = 0; int read;fp = fopen("C:\\test\\mytest.txt","r"

2015-11-23 19:44:57 645

原创 将java程序作为Windows服务

将java程序作为Windows服务我们可以将java程序作为Windows的服务来启动。首先下载 Java Service Wrapper包(http://wrapper.tanukisoftware.com/doc/english/download.jsp),在D:\MyServApp中创建bin\,conf,lib,lib\classes,logs文件夹:MyServApp\bin\MyS

2015-10-11 00:41:42 1571 1

原创 SQL SERVER中一些语句备忘

SQL SERVER中一些语句备忘只复制表结构不复制数据:SELECT * INTO TBL_USER_TMP FROM TBL_USER WHERE 1<>1

2015-10-09 21:08:45 376

原创 Java线程中的ThreadPoolExecutor

Java线程中的ThreadPoolExecutorJava线程中的ThreadPoolExecutor是ExecutorService接口的实现类,其通过线程池中的线程来执行提交的任务。线程池主要用来解决两个问题:一是用来解决大量异步任务导致的性能问题,它降低了每个任务调用的系统开销,二是其提供了对线程资源的管理。ThreadPoolExecutor自身维护了其一些属性,比如已完成的任务数等。JD

2015-09-17 00:49:41 399

原创 Java中的Callable和Future

Java中的Callable和FutureJava中的Runnable接口与线程相关,将实现该接口的对象作为参数传入Thread类。但是实现Runnable接口中的run方法没有返回值,同时没有checked exception。Callable接口对Runnable接口的补充,Callable接口中的call()返回值与其泛型类型相同,同时有checked exception。我们将实现Calla

2015-09-15 22:56:39 729

原创 Java线程中的wait, notify and notifyAll

Java线程中的wait, notify and notifyAllObject对象中有wait, notify and notifyAll三个方法,其主要用来进行进程间的通讯(communicate about their locking status)。需要注意的是,这这些方法需要在同步块中调用。waitwait有三个重载方法,一个是一直等待,直到另一线程调用该对象上的notify() 或 no

2015-09-14 20:50:14 384

原创 Java的线程的join()方法

Java的线程的join()方法Java的线程的join()方法是让当前的线程进入Blocked/Waiting状态,让调用该join()的Thread对象执行完毕后,才让当前线程进入Runnable状态,它有三个重载的方法:public final void join()该方法就是上文提到的,让当前线程进入Blocked/Waiting状态,让调用join()的Thread对象进入Dead状态之后

2015-09-13 23:35:18 491

原创 Java的线程状态切换

Java的线程状态切换在java中,当我们创建一个线程之后,在其生命周期中会有一些列的状态切换,如下图所示:上图很好地反映了线程状态之间的切换。New当我们使用New创建一个Thread对象时,此时线程还没有激活,也就是说JVM还并未对其创建其执行上下文路径。Runnable当我们调用Thread对象的start()方法时,线程进入Runnable状态,此时JVM将线程的控制权移交给了Thread

2015-09-13 22:53:52 551

转载 CSS中的containing block

CSS中的containing block是这样定义的: The position and size of an element’s box(es) are sometimes calculated relative to a certain rectangle, called the containing block of the element. The containing block o

2015-09-03 22:56:51 790

原创 CSS中display的值

CSS中display的值CSS文档中对display有这样的介绍:9.2.4 The ‘display’ property‘display’Value: inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-

2015-09-03 20:54:36 671

转载 Block Formatting Contexts

Block Formatting Contexts转自:Block Formatting ContextsA block formatting context is a box that satisfies at least one of the following:the value of “float” is not “none”,the used value of “overflow” i

2015-09-03 20:19:50 400

原创 CSS中的position

CSS中的positionCSS中的position有static,relative,absolute,fixed,inherit这几个取值。static所有的元素默认的position都是static类型的,static类型的值无top,right,button,left值,也就是说在static的布局下,top,right,button,left不起作用。relativerelative类型的与

2015-09-01 21:33:36 472

原创 JavaScript中的Objects

JavaScript中的Objects在JavaScript中,创建Objects有两种方式,declarative (literal) form和 constructed form。首先,声明式如下:var myObj = { key: value // ...};构造式如下:var myObj = new Object();myObj.key =

2015-09-01 00:28:12 1154 2

原创 JavaScript中的this关键字

JavaScript中的this关键字JavaScript函数中的关键字this并不指其本身(Itself),举例说明:function foo(num) { console.log( "foo: " + num ); // keep track of how many times `foo` is called this.count++;}foo.count = 0;var

2015-08-29 18:30:14 2013

原创 jQuery中的:input选择器

jQuery中的:input选择器jQuery中的:input选择器包括input, textarea, select 和 button这些标签。<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css">

2015-08-23 15:05:44 1751

原创 jQuery中focusin()和focus()、find()和children()的区别

focus()和focusin()、focus()和children()的区别focus()和focusin()focus()和focusin()的区别在于focusin()支持事件的冒泡,下面举例说明:<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>focusin demo</title> <s

2015-08-23 11:46:42 1226

原创 CSS优先级

CSS优先级在CSS官方文档里关于其优先级是这样的: count the number of ID selectors in the selector (= a) count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b) count the

2015-08-22 00:09:32 1245

原创 jQuery中的closest()和parents()的区别

jQuery中的closest()和parents()的区别jQuery中closest()和parents()的作用非常相似,都是向上寻找符合选择器条件的元素,但是他们之间有一些细微的差别,官网也给出了说明: .closest() .parents() Begins with the current element Begins with the parent element T

2015-08-20 23:13:58 1925

原创 jQuery中的append()和prepend(),after()和before()的区别

Jquery中的append()和preappend(),after()和before()的区别append()和prepend()假设<div class='a'> //<---you want div c to append in this <div class='b'>b</div></div>使用$('.a').append($('.c'));则会这样:<div class='a'>

2015-08-18 00:15:13 6997

原创 CSS中的body的默认margin

CSS中的body的默认margin一般浏览器中都对body标签进行默认的margin设置为8px,当然,不同的浏览器会设置成不同的值,它是由浏览器的user-agent-stylesheet提供的,有些浏览器的user-agent-stylesheet可以由用户进行修改,而有的浏览器则不可以,所以开发人员不能依靠此来修改浏览器的默认设置。如果我们要修改body的默认值,只要覆盖其css样式即可:b

2015-08-17 20:45:34 11233

原创 CSS中关于多个选择器中是否含有空格的区别

CSS中关于多个选择器中是否含有空格的区别CSS中多个选择器中含有空格和不含有空格区别很大,区分下列含义:#header.callout { }#header .callout { }第一个表示ID为header的同时类名为callout的选择器, 第二个表示ID为header下子节点中含有类名为callout的选择器我们用以下例子表明:#header.callout { }<div id="

2015-08-15 23:32:42 1146

翻译 Android Interface Definition Language (AIDL)

Android Interface Definition Language (AIDL)AIDL (Android Interface Definition Language) is similar to other IDLs you might have worked with. It allows you to define the programming interface that both

2015-08-11 10:53:03 469

翻译 Bound Services

Bound ServicesA bound service is the server in a client-server interface. A bound service allows components (such as activities) to bind to the service, send requests, receive responses, and even perfo

2015-08-10 20:31:01 301

空空如也

空空如也

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

TA关注的人

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