摘要: ApplicationListener、contextConfigLocation、ContextLoaderListener 阅读全文
posted @ 2018-03-23 10:21 渡劫锦官城 阅读(705) 评论(0) 推荐(0) 编辑
摘要: 1、nextBoolean(): 随机返回true或false 2、nextInt(int bound): 随机返回0到bound之间的整数(不包括bound) 如:nextInt(10)返回0-9之间的随机数,nextInt(100)返回0-99之间的随机数 3、nextDouble(): 返回( 阅读全文
posted @ 2018-03-16 15:16 渡劫锦官城 阅读(898) 评论(0) 推荐(0) 编辑
摘要: 1、Calendar.MONTH 月份从0-11,获取之后需要加1才能得到真正的月份 2、Calendar.DAY_OF_WEEK 本周的第几天,从星期天开始算 3、Calendar.WEEK_OF_MONTH和Calendar.DAY_OF_WEEK_IN_MONTH的区别 DAY_OF_WEEK 阅读全文
posted @ 2018-03-15 10:30 渡劫锦官城 阅读(532) 评论(0) 推荐(1) 编辑
摘要: 一、找到ssh配置文件位置 vim /etc/ssh/sshd_config 二、修改ssh登录端口号 修改 port 22 为 port xxxx 三、重启ssh服务 /etc/init.d/ssh restart 阅读全文
posted @ 2018-03-07 11:26 渡劫锦官城 阅读(2522) 评论(0) 推荐(0) 编辑
摘要: 一、查看是否安装了ssh服务 apt-cache policy openssh-client openssh-server ubuntu默认安装了openssh-client,openssh-server需要手动安装 二、安装ssh服务 apt-get install openssh-server 阅读全文
posted @ 2018-03-04 23:15 渡劫锦官城 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: 一、安装 apt-get install mysql-server 二、本地连接 mysql默认开启了本地连接 直接通过mysql -uuser -p,然后输入密码访问 三、开启远程访问 3.1、创建一个与管理员同等权限的用户 grant all privileges on *.* to 'user 阅读全文
posted @ 2018-03-04 21:13 渡劫锦官城 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 原因: ubuntu存在一个bug:在/var/run/目录下缺少一个文件夹sshd 解决方法: 在命令行输入: sudo mkdir /var/run/sshd sudo /usr/sbin/sshd netstat -nlt 出现以下日志问题就解决了: Active Internet conne 阅读全文
posted @ 2018-03-01 22:51 渡劫锦官城 阅读(613) 评论(0) 推荐(0) 编辑
摘要: SpringMVC拦截器实现:当用户访问网站资源时,监听session是否过期 一、拦截器配置 二、拦截器编码 三、总结 1.注意这里使用的拦截器是HandlerInterceptor,你的拦截器需要实现这个接口 2.在你的登录handler里面,要将session保存到application中,方 阅读全文
posted @ 2017-10-24 22:39 渡劫锦官城 阅读(5784) 评论(0) 推荐(0) 编辑
摘要: Application作用域实现:当用户重复登录时,挤掉原来的用户 一、实现思想 1.application(ServletContext)是保存在服务器端的作用域,我们在application中保存两种形式的键值对:1:<userId, sessionId>,2:<sessionId, sessi 阅读全文
posted @ 2017-10-24 22:22 渡劫锦官城 阅读(2310) 评论(0) 推荐(0) 编辑
摘要: sql连接查询(inner join、full join、left join、 right join)以及mysql中全连接的实现方式(UNION) 阅读全文
posted @ 2017-09-22 10:08 渡劫锦官城 阅读(2787) 评论(0) 推荐(0) 编辑