《Redis设计和实现》笔记
《Redis设计和实现》-2014-豆瓣8.5分-黄健宏;这是平时读书总结的思维导图笔记,希望引起同学们的兴趣。
安装gearman 如果没有mysql客户端,需要安装mysql客户端 yum install -y libevent-devel 上传gearman.zip,解压unzip gearman.zip rpm -ivh uuid-1.5.1-3.el5.x86_64.rpm rpm -ivh libgearman-1.1.8-2.el5.x86_64.rpm rpm -ivh libgearman-devel-1.1.8-2.el5.x86_64.rpm rpm -ivh boost141-program-options-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-date-time-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-system-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-filesystem-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-regex-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-graph-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-iostreams-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-python-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-serialization-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-signals-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-test-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-thread-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-wave-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-math-1.41.0-5.el5.x86_64.rpm rpm -ivh boost141-devel-1.41.0-5.el5.x86_64.rpm rpm -ivh gearmand-1.1.8-2.el5.x86_64.rpm gearman 启动: gearmand -d --threads 100 -L 0.0.0.0
1.无maven,照样实现发布war中不含测试代码 在主工程中,不包含任何测试代码,理论上连main方法都不应该存在。测试代码常常放在与主工程同package的下面,以Test+className作为类名。由于采用了junit4,建议使用注解来进行测试用力的配置,而不需要用test开头的method 2.无需启动tomcat、weblogic 等服务器,速度快 3.可以很方便debug,节省人力 只需要利用测试工程的junit-debug即可,有时候可能涉及到缓存,这个时候可以在本地配置缓存,并且启动缓存的客户端即可。 4.spring-test 与junit4的 利用,可以直接使用spring配置文件或者自己修改测试文件 采用spring-test的测试注解: 1)junit4的注解:@RunWith(value=SpringJUnit4ClassRunner.class) 2)spring-test的注解:@ContextConfiguration(locations={"classpath:applicationContext-test.xml"}) 5.方便svn管理,不会导致无效版本代码泛滥,没有经过测试的代码绝对不能上传 6.运行时修改配置,通过@Before,方便调试远程接口的本地应用。