摘要: Cookie的生命周期问题 设置Cookie对象的有效时间, setMaxAge()方法便可以设置Cookie对象的有效时间, 例如:Cookie c = new Cookie(“username”,”john”); c.setMaxAge(60);//60秒的意思 c.setMaxAge(60*6 阅读全文
posted @ 2018-08-09 09:19 长脸冬瓜 阅读(2149) 评论(0) 推荐(0) 编辑
摘要: CentOS7.2安装mariadb-server,解决Failed to start mysqld.service: Unit not found 当输入命令 ~]# systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 Failed to start 阅读全文
posted @ 2018-06-25 18:14 长脸冬瓜 阅读(720) 评论(0) 推荐(0) 编辑
摘要: 今天在解压.tar.gz文件时,遇到问题,在这里记录一下解决方法: 执行 $ tar -zxvf xxxx.tar.gz 命令时, 提示以下信息: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is n 阅读全文
posted @ 2018-06-21 15:56 长脸冬瓜 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 大数据和高并发的解决方案汇总 1.3海量数据解决方案 1.使用缓存: 使用方式:1,使用程序直接保存到内存中。主要使用Map,尤其ConcurrentHashMap。 2,使用缓存框架。常用的框架:Ehcache,Memcache,Redis等。 最关键的问题是:什么时候创建缓存,以及其失效机制。 阅读全文
posted @ 2018-06-21 15:23 长脸冬瓜 阅读(9449) 评论(0) 推荐(0) 编辑