摘要: 在线小工具在线Cron表达式生成器在线工具-程序员的工具箱在线文档JDK7英文文档Spring5.x英文文档Mybatis3官网Dubbo官网Nginx中文文档Freemarker在线手册Velocity在线手册Bootstrap在线手册Git官网中文文档ThymeleafRedis的基础上实现的J 阅读全文
posted @ 2018-01-09 13:24 houxiurong.com 阅读(345) 评论(2) 推荐(0) 编辑
 
摘要: package eh.util; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.joda.time.Years; import org.joda.time.format.DateTimeFormat; ... 阅读全文
posted @ 2017-04-05 09:24 houxiurong.com 阅读(246) 评论(0) 推荐(0) 编辑
 
摘要: 该内容来自 http://houxiurong.com,转载请说明出处。 1.使用IP访问的项目放在Tomcat7 的webapps目录下面:比如:AAA 2.使用域名访问的项目放在Tomcat7的webapps目录下有个ROOT目录,放在ROOT这个目录下:比如:BBB。注:AAA BBB分别为要 阅读全文
posted @ 2016-01-12 17:51 houxiurong.com 阅读(292) 评论(0) 推荐(0) 编辑
  2017年7月1日

下载、解压、重命名并且编译安装Redis
~ wget http://download.redis.io/releases/redis-3.2.9.tar.gz
~ tar xzf redis-3.2.9.tar.gz
~ mv redis-3.2.9 redis
~ cd redis
~ make
~ make test
~ make install
配置文件redis.conf
redis解压目录里有一个配置文件redis.conf ,编辑此配置文件,找到 dir ./ 这一行[247行]。redis会将内存中的数据写入文件中,而此配置就是指定数据文件保存的路径。
我本机指定的目录:
dir ./
修改为
dir /Users/houxiurong/Software/redis_data/
编辑过后,将配置文件移动到 /usr/local/etc 目录下
~ sudo mv redis.conf /usr/local/etc/
启动Redis
终端输入:
~ /usr/local/bin/redis-server /usr/local/etc/redis.conf
服务启动成功画面:
houxiurong-MacBook-Pro:src houxiurong$ /usr/local/bin/redis-server /usr/local/etc/redis.conf
6508:M 01 Jul 18:21:33.662 * Increased maximum number of open files to 10032 (it was originally set to 256).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.9 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 6508
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'

6508:M 01 Jul 18:21:33.664 # Server started, Redis version 3.2.9
6508:M 01 Jul 18:21:33.664 * DB loaded from disk: 0.000 seconds
6508:M 01 Jul 18:21:33.664 * The server is now ready to accept connections on port 6379

测试连通性
~ cd /usr/local/bin
~ ./redis-cli
127.0.0.1:6379> set me houxiurong
OK
127.0.0.1:6379> get me
"houxiurong"
设置开机自动启动redis server
新建plist文件
~ sudo vi /Library/LaunchDaemons/io.redis.redis-server.plist
文件内容如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.redis.redis-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/redis-server</string>
<string>/usr/local/etc/redis.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
使用launchctl设置开机自动启动
~ sudo launchctl load /Library/LaunchDaemons/io.redis.redis-server.plist
使用launchctl启动redis server
~ sudo launchctl start io.redis.redis-server
使用launchctl停止redis server
~ sudo launchctl stop io.redis.redis-server

posted @ 2017-07-01 18:28 houxiurong.com 阅读(1054) 评论(0) 推荐(0) 编辑
  2017年6月22日
摘要: 转载请注明出处:http://www.houxiurong.com/?post=27 Mac默认是安装了ssh工具软件的。 先用mac的 终端工具生成 id_rsa 和id_rsa.pub 秘钥,生成方式如下: 1、当前用户目录下,检查SSH公钥 cd ~/.ssh 看看存不存在.ssh,如果存在的 阅读全文
posted @ 2017-06-22 09:42 houxiurong.com 阅读(1267) 评论(0) 推荐(1) 编辑
  2017年5月10日
摘要: IDEA的主题可以自定义,也可从网上下载 http://www.riaway.com/theme.php 喜欢的主题,保存到本地。 主题是一个jar的包。导入到idea的方法如下: file –> import setttings –>主题jar文件 –> 确认 –> 重启 这样就导入主题了。 同样 阅读全文
posted @ 2017-05-10 17:16 houxiurong.com 阅读(12325) 评论(0) 推荐(1) 编辑
  2017年4月27日
摘要: Findbugs是一个静态分析工具,它检查类或者JAR 文件,将字节码与一组缺陷模式进行对比以发现可能的问题。Findbugs自带检测器,其中有60余种Bad practice,80余种Correctness,1种 Internationalization,12种Malicious code vul 阅读全文
posted @ 2017-04-27 15:12 houxiurong.com 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 使用Apache Commons Lang包中的 StringUtils类就可以完成这个工作。 计算结果: n=6 阅读全文
posted @ 2017-04-27 13:49 houxiurong.com 阅读(427) 评论(0) 推荐(0) 编辑
  2017年4月26日
摘要: Django==1.10.3 -e git+https://github.com/duoshuo/duoshuo-python-sdk.git#egg=duoshuo-python-sdk django-pingback django-xmlrpc==0.1.4 gunicorn==18.0 BeautifulSoup==3.2.1 supervisor==3.0 Docutils==0.11 ... 阅读全文
posted @ 2017-04-26 16:12 houxiurong.com 阅读(482) 评论(0) 推荐(0) 编辑
摘要: String,StringBuffer,StringBuilder效率优先关系说明: 控制台输出结果: String耗时:8253StringBuffer耗时:9StringBuilder耗时:8 Process finished with exit code 0 结论:可想而知,效率最高的是Str 阅读全文
posted @ 2017-04-26 14:50 houxiurong.com 阅读(660) 评论(0) 推荐(0) 编辑
  2017年4月13日
摘要: 使用事例: 阅读全文
posted @ 2017-04-13 11:11 houxiurong.com 阅读(207) 评论(0) 推荐(0) 编辑
  2017年4月10日
摘要: 转载:Spring Boot自定义错误页面,Whitelabel Error Page处理方式 阅读全文
posted @ 2017-04-10 18:00 houxiurong.com 阅读(407) 评论(0) 推荐(0) 编辑
< a href="http://houxiurong.com">houxiurong.com
点击右上角即可分享
微信分享提示