- 博客(16)
- 资源 (2)
- 收藏
- 关注
原创 window下部署redis集群出现问题总结
一.准备工作1.准备一个redis,删除目录下的,dump.rdb文件,并修改他的配置文件:redis.windows.conf1.修改端口:我设置为 port 70012.放开配置: cluster-enabled yes cluster-config-file nodes-7001.conf //名称可自改 cluster-node-timeout 15000将这个redis复制5份,并修改相应配置,将端口设置为:7001,7002,7003,7004,70
2020-10-15 10:44:07 853 1
原创 索引的相关注意事项
explain显示了MySQL如何使用索引来处理select语句以及连接表。可以帮助选择更好的索引和写出更优化的查询语句。使用方法,在select语句前加上explain就可以了:如:explainselectsurname,first_namefroma,bwherea.id=b.idEXPLAIN列的解释:table:显示这一行的数据是关于哪张表的type:这是重要的列,显示连接使用了何种类型。从最好到最差的连接类型为const、eq_reg、ref、range、...
2020-09-03 10:48:05 227
转载 Mysql根据某层部门ID查询所有下级多层子部门
sql语句select id,name from (select t1.id,t1.name,if(find_in_set(pid, @pids) > 0,@pids := concat(@pids, ',', id),0) as ischildfrom(select id,pid,name from sys_dept t order by pid,id ) t1,(select @pids := #{deptId}) t2 ) t3 where ischild != 0#{deptId
2020-07-04 10:30:15 3434 1
原创 关于JSON的解析问题以及常规用法
JSON解析String jsonString ="{\"name\":\"zhangsan\",\"password\":\"zhangsan123\",\"email\":\"10371443@qq.com\"}"; JSONObject json = JSONObject.fromObject(jsonString); User user = new User(); user.setName(json.getString("nam
2020-06-15 11:04:52 284
转载 Caused by: java.lang.ClassNotFoundException: org.springframework.scheduling.quartz.CronTriggerBean
在ssm框架中配置quartz定时器出现:Caused by: java.lang.ClassNotFoundException: org.springframework.scheduling.quartz.CronTriggerBean at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net...
2019-05-14 16:38:45 2140
转载 ssm中配置quartz定时器,直接贴代码了
首先需要建立几个文件:需要在pom中添加依赖 <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.2.1</ve...
2019-05-14 16:32:41 931
原创 关于使用redis存储删除数值,对象,list集合,并将存储的值取出来
首先需要下载个Redis安装包,网上有。首先我们需要对redis进行一些配置,可以建一个Util类package com.redis.util;import redis.clients.jedis.Jedis;import redis.clients.jedis.JedisPool;import redis.clients.jedis.JedisPoolConfig;publ...
2019-05-14 15:04:00 4656 2
原创 使用juery使用ajax实现用户注册时的验证
首先需要在jsp页面中加入juery:在jsp中头插入<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script> jsp页面代码:<div class="huiyuan_zc"><div class="zhuce_1">用户
2018-06-06 16:35:43 1457
原创 自己写的关于用户注册中密码使用MD5加密,直接上代码
我们只需要传入一个密码,会直接返回一个加密的密码:package org.fkit.hrm.util.message;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public class CreateMD5 { public static String getMd5(S...
2018-06-04 08:39:48 3132 1
转载 关于java中两个Double之间运算异常解决方法,直接上代码,可以直接用
package org.fkit.hrm.util.zys;import java.math.BigDecimal;/* * * * 解决 double 类 型 计 算 过 程 中 出 错 的 问 题 * * * */public class DoubleAndBigDecimal { //加法 public double add(double ...
2018-06-01 18:33:40 1277
原创 简单生成验证码,在Servlet和ssm框架中都可以用。
首先在jsp页面要展示生成的验证码,代码如下:<form action="${pageContext.request.contextPath }/CheckCodeServlet" method="post"> 请输入验证码:<input type="text" name="code"> <input type="submit&
2018-05-31 09:00:57 1304 1
原创 关于接入阿里云短信验证码接口的实现
package com.zys.util;import com.aliyuncs.DefaultAcsClient;import com.aliyuncs.IAcsClient;import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;import com.aliyuncs.dysmsapi.model.v20170525.SendSm...
2018-05-08 09:46:38 3438
转载 oracle sql语句 创建表空间、数据库
1、查看表空间的名称及大小 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespa
2018-01-11 10:17:30 1387
转载 CentOS下安装JDK的三种方法
由于各Linux开发厂商的不同,因此不同开发厂商的Linux版本操作细节也不一样,今天就来说一下CentOS下JDK的安装:方法一:手动解压JDK的压缩包,然后设置环境变量1.在/usr/目录下创建java目录[root@localhost ~]# mkdir/usr/java[root@localhost ~]# cd /usr/java2.下载jdk,然后解
2018-01-11 09:29:34 233
原创 基本ssh框架配置
spring.xml中的配置 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/be
2017-11-08 10:38:36 529
原创 mysql数据库连接项目及基础增删改查封装代码
//使用JDBC连接数据库:conf.properties:driver=com.mysql.jdbc.Driverurl=jdbc:mysql://localhost:3306/booksusername=rootpassword=rootConnectionFactory.java:package ui;import java.io.IOExce
2017-10-26 09:57:41 468
formSelects.zip
2020-05-25
关于redis缓存所需要的redis安装包非常好用
2019-05-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人