可以参考2篇文章,讲的挺不错的: http://blog.youkuaiyun.com/bigconvience/article/details/26697645 http://www.xuebuyuan.com/2013505.html