<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[吃苦胆的野狼]]></title><description><![CDATA[文可广略，术需专攻]]></description><link>https://blog.csdn.net/hhooong</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; hhooong]]></copyright><item><title><![CDATA[通过故事理解 悲观锁与乐观锁]]></title><link>https://blog.csdn.net/hhooong/article/details/79052462</link><guid>https://blog.csdn.net/hhooong/article/details/79052462</guid><author>hhooong</author><pubDate>Sat, 13 Jan 2018 17:05:52 +0800</pubDate><description><![CDATA[悲观锁与乐观锁写这篇文章的起因，是由于上面这张截图。 
这是项目经理发在开发群的一张图，我这边只截取了非敏感信息出来。可以看到，多台机器都在执行着一条SQL，而这条SQL却一直处于等待状态（导致请求耗时过长）。原因则是SQL尾巴的 for update （悲观锁）字眼。通过故事来了解悲观锁与乐观锁故事背景A员工和B员工，是某电商平台的两位小员工（线程）。某日A接到通知，卖出巧克力30块，请对库存减少]]></description><category></category></item><item><title><![CDATA[并发编程 —— CountDownLatch]]></title><link>https://blog.csdn.net/hhooong/article/details/78947468</link><guid>https://blog.csdn.net/hhooong/article/details/78947468</guid><author>hhooong</author><pubDate>Mon, 01 Jan 2018 21:13:46 +0800</pubDate><description><![CDATA[并发编程 —— CountDownLatch

CountDownLatch，是我在平时开发过程中，比较常用到的线程辅助类。 
常见的应用场景：主线程需等于其它线程任务完成后，才可继续执行。

举个例子，我想看在播放器上看下载到本地的电影。那么下载播放器和下载电影，就是两个任务。下载播放器的同时，也可以下载电影。可以并发处理。而我的主线程，需要等待这两个任务完成后，才可继续继续进行。像这种场景，我]]></description><category></category></item><item><title><![CDATA[聊一聊这个博客]]></title><link>https://blog.csdn.net/hhooong/article/details/78826385</link><guid>https://blog.csdn.net/hhooong/article/details/78826385</guid><author>hhooong</author><pubDate>Sun, 17 Dec 2017 17:39:40 +0800</pubDate><description><![CDATA[起初创建这个博客，是为了记录下自己在码农之路上踩过的一些坑。内容不算高产，质量也不算高。纯粹是笔记，而非对于某个问题或是某个知识领域的系统性总结。
从14年到现在，已经过了三年有余。期间，我的博客内容多少帮到了一些同行的朋友，有一些博文里，我留下了我的邮箱，方便问题交流。三年来一共收到了100多封的邮件。发送邮件的对象，主要都是大学生群体。c9、985、211、普本，甚至有一些研究生也向我发送了邮件]]></description><category></category></item><item><title><![CDATA[Building a RESTful api with Spring note2]]></title><link>https://blog.csdn.net/hhooong/article/details/78810703</link><guid>https://blog.csdn.net/hhooong/article/details/78810703</guid><author>hhooong</author><pubDate>Fri, 15 Dec 2017 11:06:10 +0800</pubDate><description><![CDATA[The Default Message Converters￼Client-Server Communication – JSON only1、High Level Content Negotiation￼2、@ResponseBody￼example￼3、RequestBodyexample￼4、Using Spring’s RestTemplate with Http Message Conve]]></description><category></category></item><item><title><![CDATA[Building a RESTful api with Spring note1]]></title><link>https://blog.csdn.net/hhooong/article/details/78705506</link><guid>https://blog.csdn.net/hhooong/article/details/78705506</guid><author>hhooong</author><pubDate>Sun, 03 Dec 2017 23:40:36 +0800</pubDate><description><![CDATA[Understanding REST in SpringThe Spring framework supports 2 ways of creating RESTful services:
using MVC with ModelAndView
using HTTP message converters
The ControllerCRUD methodMapping the HTTP respon]]></description><category></category></item><item><title><![CDATA[Mybatis 批量插入]]></title><link>https://blog.csdn.net/hhooong/article/details/72785058</link><guid>https://blog.csdn.net/hhooong/article/details/72785058</guid><author>hhooong</author><pubDate>Sat, 27 May 2017 22:22:02 +0800</pubDate><description><![CDATA[阿里云股票业务有提供一项查询功能，发送股票名称，返回股票编码，在毕业设计的开发过程中，我用到了这个功能。由于需要支付费用，毕设结束后便考虑自己动手实现。
找到了这个地址：http://quote.eastmoney.com/stock_list.html
对股票信息数据进行抓取后入库，有4000多条数据，如果采用传统的入库方式，一条条数据插入，数据库I/O会浪费比较大的资源。


尝试了]]></description><category></category></item><item><title><![CDATA[Java序列化与反序列化 —— serialVersionUID作用]]></title><link>https://blog.csdn.net/hhooong/article/details/72528827</link><guid>https://blog.csdn.net/hhooong/article/details/72528827</guid><author>hhooong</author><pubDate>Fri, 19 May 2017 14:30:14 +0800</pubDate><description><![CDATA[转载至：http://swiftlet.net/archives/1268

serialVersionUID适用于Java的序列化机制。简单来说，Java的序列化机制是通过判断类的serialVersionUID来验证版本一致性的。在进行反序列化时，JVM会把传来的字节流中的serialVersionUID与本地相应实体类的serialVersionUID进行比较，如果相同就认为是一致的，可]]></description><category></category></item><item><title><![CDATA[网络爬虫技术交流——爬虫第三课]]></title><link>https://blog.csdn.net/hhooong/article/details/68489603</link><guid>https://blog.csdn.net/hhooong/article/details/68489603</guid><author>hhooong</author><pubDate>Thu, 30 Mar 2017 18:04:25 +0800</pubDate><description><![CDATA[CNKI例子后续
首先我们先来看看CNKI的主页，常用的就是往搜索框中数据所要查找的数据，根据所需语言选择对应的文献。






在爬虫第一课，我们介绍了fiddler、chrome开发者工具、firebug等工具。


爬虫关键的一部就是要了解到你的电脑和互联网之间的http通讯，然后了解到请求方式，请求地址，所需参数等信息后，再通过代码发送请求。


我个人常用的]]></description><category></category></item><item><title><![CDATA[网络爬虫技术交流——爬虫第二课]]></title><link>https://blog.csdn.net/hhooong/article/details/66478174</link><guid>https://blog.csdn.net/hhooong/article/details/66478174</guid><author>hhooong</author><pubDate>Sun, 26 Mar 2017 19:48:46 +0800</pubDate><description><![CDATA[爬虫代码Demo的演示
	CloseableHttpClient client = HttpClients.createDefault(); //创建HttpClient对象
        HttpGet request = new HttpGet("https://www.baidu.com/"); //创建一个GET请求
        HttpResponse response = cl]]></description><category></category></item><item><title><![CDATA[网络爬虫技术交流——爬虫第一课]]></title><link>https://blog.csdn.net/hhooong/article/details/66477221</link><guid>https://blog.csdn.net/hhooong/article/details/66477221</guid><author>hhooong</author><pubDate>Sun, 26 Mar 2017 19:20:24 +0800</pubDate><description><![CDATA[爬虫的基本概念

•按照一定的规则，自动地抓取万维网信息的程序或者脚本


常见的爬虫分类
•通用网络爬虫
•爬取对象从一些种子URL 扩充到整个Web，主要为门户站点搜索引擎和大型Web 服务提供商采集数据)




•聚焦网络爬虫
•又称主题网络爬虫（TopicalCrawler），是指选择性地爬取那些与预先定义好的主题相关页面的网络信息




•增量式网]]></description><category></category></item><item><title><![CDATA[Illegal character in query Url中含有{}]]></title><link>https://blog.csdn.net/hhooong/article/details/53270335</link><guid>https://blog.csdn.net/hhooong/article/details/53270335</guid><author>hhooong</author><pubDate>Mon, 21 Nov 2016 23:43:02 +0800</pubDate><description><![CDATA[在抓取某网站信息的时候，url是这样的： http....{...}...，出现了大括号。
原样将url放在代码里，发送post请求的时候，发现请求不到数据。但把url放到浏览器里是ok的。
对相关的参数数据，均已进行了URLencode编码，但仍然不起作用。
后面想了想，干脆对{}也encode试试，毕竟没有遇到过url里有{}的，


数据可以获取到了。
报Illegal cha]]></description><category></category></item><item><title><![CDATA[持续集成]]></title><link>https://blog.csdn.net/hhooong/article/details/53214068</link><guid>https://blog.csdn.net/hhooong/article/details/53214068</guid><author>hhooong</author><pubDate>Fri, 18 Nov 2016 11:10:45 +0800</pubDate><description><![CDATA[持续集成

持续集成概念介绍

持续集成模块详解



持续集成（Continuous Integration），简称CI



持续集成概念介绍
百度百科：

持续集成是一种软件开发实践，即团队开发成员经常集成他们的工作，通过每个成员每天至少集成一次，也就意味着每天可能会发生多次集成。每次集成都通过自动化的构建（包括编译、发布、自动化测试）来验证，从而尽早地发现集成]]></description><category></category></item><item><title><![CDATA[FastDateFormat 时间戳转换]]></title><link>https://blog.csdn.net/hhooong/article/details/53064561</link><guid>https://blog.csdn.net/hhooong/article/details/53064561</guid><author>hhooong</author><pubDate>Mon, 07 Nov 2016 11:07:22 +0800</pubDate><description><![CDATA[SimpleDateFormat来做Date到String的类型转换，建议使用Apache commons-lang中的FastDateFormat。
因为JDK里自带的SimpleDateFormat存在线程不安全问题。
直接贴上代码，参数里是long型的时间戳
/**
 * Created by huanghong on 2016/11/4.
 */

@Service
public c]]></description><category></category></item><item><title><![CDATA[ELK 日志分析平台搭建]]></title><link>https://blog.csdn.net/hhooong/article/details/53037361</link><guid>https://blog.csdn.net/hhooong/article/details/53037361</guid><author>hhooong</author><pubDate>Fri, 04 Nov 2016 17:34:53 +0800</pubDate><description><![CDATA[一、ELK介绍

本节内容来自 开源实时日志分析ELK平台部署，感谢原作者详细的介绍。

日志主要包括系统日志、应用程序日志和安全日志。系统运维和开发人员可以通过日志了解服务器软硬件信息、检查配置过程中的错误及错误发生的原因。经常分析日志可以了解服务]]></description><category></category></item><item><title><![CDATA[Spring 注解 Demo]]></title><link>https://blog.csdn.net/hhooong/article/details/52972282</link><guid>https://blog.csdn.net/hhooong/article/details/52972282</guid><author>hhooong</author><pubDate>Sun, 30 Oct 2016 15:35:33 +0800</pubDate><description><![CDATA[分为业务层、持久层、表现层
业务层：
@Service
public class UserService {
	
	@Autowired
	private UserRepository userRepository;
	public void service(){
		System.out.println("UserService service..");
		userRepository.s]]></description><category></category></item><item><title><![CDATA[使用注解来构造IoC容器]]></title><link>https://blog.csdn.net/hhooong/article/details/52972271</link><guid>https://blog.csdn.net/hhooong/article/details/52972271</guid><author>hhooong</author><pubDate>Sun, 30 Oct 2016 15:29:49 +0800</pubDate><description><![CDATA[Spring常用注解


使用注解来构造IoC容器
用注解来向Spring容器注册Bean。需要在applicationContext.xml中注册。
如：在base-package指明一个包

1 context:component-scan base-package="cn.gacl.java"/>

表明cn.gacl.java包及其子包中，如果某个类的头上带有特定的注解【]]></description><category></category></item><item><title><![CDATA[HttpClient request payload post请求]]></title><link>https://blog.csdn.net/hhooong/article/details/52750647</link><guid>https://blog.csdn.net/hhooong/article/details/52750647</guid><author>hhooong</author><pubDate>Fri, 07 Oct 2016 17:33:50 +0800</pubDate><description><![CDATA[最近在做一些爬虫相关的工作，遇到了一个网站，在使用谷歌开发者工具监控的时候，发现他的请求是这样的


我们都知道传统的post请求，所提交的是form data 格式的，key-value键值对的形式提交。这个在爬虫post请求中非常常见。
第一次遇到了这种形式提交的，后面去找了很多方法，发现在百度搜的答案都用不了，后面翻墙去了stackoverflow，这边贴上地址
http://st]]></description><category></category></item><item><title><![CDATA[Spring学习笔记（六） Bean的作用域 & Spel 表达式]]></title><link>https://blog.csdn.net/hhooong/article/details/52614081</link><guid>https://blog.csdn.net/hhooong/article/details/52614081</guid><author>hhooong</author><pubDate>Wed, 21 Sep 2016 22:27:26 +0800</pubDate><description><![CDATA[Bean的作用域
Bean的作用域，通过scope属性来控制。
默认为singleton，意味着使用的是单例对象，容器初始化的时候，即创建实例，全程就使用这个对象
设置为prototype，则在容器初始化的时候，不会创建该bean对象。而是每个请求的时候，才创建一个新的bean实例返回



<beans xmlns="http://www.springframework.org/sc]]></description><category></category></item><item><title><![CDATA[Spring 学习笔记（五）]]></title><link>https://blog.csdn.net/hhooong/article/details/52517919</link><guid>https://blog.csdn.net/hhooong/article/details/52517919</guid><author>hhooong</author><pubDate>Mon, 12 Sep 2016 22:02:58 +0800</pubDate><description><![CDATA[Bean之间的关系 —— 继承和依赖
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocat]]></description><category></category></item><item><title><![CDATA[Spring 学习笔记（四）]]></title><link>https://blog.csdn.net/hhooong/article/details/52454342</link><guid>https://blog.csdn.net/hhooong/article/details/52454342</guid><author>hhooong</author><pubDate>Tue, 06 Sep 2016 22:22:57 +0800</pubDate><description><![CDATA[集合属性：
在Spring中可以通过一组内置的xml标签、、来配置集合属性


需要指定具体标签，对应集合类型。可以通过简单的value、或是ref指向对其他bean的引用，或是通过
手写内部bean


数组定义和list一样，set集合也是。


map 通过entry标签。以key - value 的形式进行书写


properties ，后期和dataSour]]></description><category></category></item></channel></rss>