- 博客(45)
- 收藏
- 关注
原创 java执行CMD命令调用外部程序会直接运行完毕
public jsonResult callCmd(String locationCmd) {jsonResult result = new jsonResult();BufferedReader br = null;try {File file = new File(“D:\daemonTmp”);File tmpFile = new File(“D:\daemonTmp\temp.t...
2020-02-28 22:27:08
462
原创 nginx配置https证书
一、Nginx安装http_ssl_module模块Nginx如果未开启SSL模块,配置Https时提示错误。nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:xxxnginx缺少http_ssl_module模块,编译安装的时候带上–wit...
2019-12-31 17:43:17
565
原创 java验证文件的MD5
public static String getMD5(String path) {StringBuffer sb = new StringBuffer("");try {MessageDigest md = MessageDigest.getInstance(“MD5”);md.update(FileUtils.readFileToByteArray(new File(path)));...
2019-12-26 17:00:39
717
原创 mysql8 Unable to load authentication plugin 'caching_sha2_password'.问题解决
解决方案:再重置下密码:alter user ‘root’@‘localhost’ identified by ‘root’;
2019-11-16 20:49:13
362
原创 新版数据库mysql库user表
#插入数据:mysql> create user 'root'@'172.21.32.21' identified by '123456';#设置:mysql> ALTER USER 'root'@'172.21.32.21‘ identified by '123456';#刷新权限:mysql> flush privileges;...
2019-11-16 20:38:02
376
原创 三台服务器部署Hadoop集群HA高可用
一.安装JAVA环境——JDK二.配置hosts系统文件[root@nna /]# vi /etc/hosts在hosts文件中添加:172.21.32.21 nna172.21.32.6 nns172.21.32.40 dn1编辑完成后保存退出,在另外两台服务器上做相同操作。三.安装SSH生成该节点的私钥和公钥,将生成的公钥(id_rsa.pub)文件中的内容追加到autho...
2019-11-16 18:18:16
828
原创 Hive连接mysql时报错:message from server: "Host 'DESKTOP-73BL0HG' is not allowed to connect to this MySQL
具体错误为:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.Underlying cause: java.sql.SQLException : null, message from server: “Host ‘DESKTOP-73BL0HG’ is not allowed to...
2019-11-13 14:42:22
1933
1
原创 Linux下安装JDK1.8后,java -version仍然显示版本为1.7的问题
最近在Linux上运行kafka时,遇到因JDK版本过低,无法运行的问题。java -version了一下,发现我新装的系统默认的是自带的OpenJDK1.7 。于是我打算重装一个JDK1.8.首先,先去官网下载了相应的安装包;其次解压到/usr/local/src/jdk目录下,最后配置环境变量,并使其生效(这3个步骤,详细操作方法见百度)。经过这3个步骤,发现java -version并没有...
2019-11-08 17:52:49
1340
1
原创 Linux下nginx宕机自动启动
cd /usr/local/nginx/sbin/touch nginx_restart.shnginx_restart.sh文件内容如下:#!/bin/shwhile truedoA=`ps -C nginx --no-header | wc -l`if [ $A -eq 0 ];then echo $(date +%F%n%T) "Restart Nginx...
2019-11-01 20:54:46
954
原创 java里对象转String类型,String类型转对象
在pom.xml文件里先添加依赖<dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version>...
2019-11-01 20:24:37
2628
原创 Log4j2在springcloud与springboot项目里的使用
先在pom.xml文件里添加依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> &l...
2019-10-30 20:50:19
753
原创 nginx+keepalive主从双机热备+自动切换解决方案
keepalived安装1、安装keepalivedwget http://www.keepalived.org/software/keepalived-2.0.19.tar.gztar -zxvf keepalived-2.0.19.tar.gz -C /usr/local/cd keepalived-2.0.19./configure --prefix=/usr/local/k...
2019-10-25 22:01:49
1406
原创 java里execl表导入
//物品批量导入 public HttpResult sendGoods(InputStream fis) { HttpResult result = new HttpResult(); ArrayList<goods> infos = new ArrayList<goods>(); goods goods = nul...
2019-10-11 16:29:19
115
原创 java里execl表导出
结构:控制器://礼包码导出 @RequestMapping("/codeExport") public void codeExport(gift_code giftCode) throws Exception { List<gift_code> codeList = giftManageService.selectByPID(giftCode);...
2019-10-11 16:23:09
115
原创 java.lang.NoSuchFieldError: RETURN_NULL_AND_BLANK 问题解决
<!-- excel包 --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.11</vers...
2019-10-11 16:15:31
9229
2
原创 com.mysql.jdbc.Driver 和 com.mysql.cj.jdbc.Driver的区别
com.mysql.jdbc.Driver 是 mysql-connector-java 5中的,com.mysql.cj.jdbc.Driver 是 mysql-connector-java 6中的1、JDBC连接Mysql5 com.mysql.jdbc.Driver:driverClassName=com.mysql.jdbc.Driverurl=jdbc:mysql://local...
2019-10-11 16:09:32
224
原创 @MapperScan和@Mapper的使用
使用@Mapper注解使用@MapperScan注解使用@Mapper注解 为了让DemoMapper能够让别的类进行引用,我们可以在DemMapper类上添加@Mapper注解:@Mapperpublic interface DemoMapper {@Insert(“insert into Demo(name) values(#{name})”) @Options(keyPrope...
2019-10-10 17:03:10
2816
原创 html里table中的<tr>大于一定数量时隐藏
<table id="notice"> <tr> <th>标题</th> <th>日期</th> <th>内容</th> </tr> @for(notice in noticeList){ <tr> <td>${...
2019-05-16 16:39:23
613
原创 Maven工程设置生成的war包名称
在pom.xml文件里添加:<build> <finalName>生成的war包名称</finalName></build>
2019-05-06 14:45:48
1612
原创 linux远程运行jar包,关闭终端后程序继续运行
在Linux远程运行JAR包时,是不能关掉窗口程序的,否则程序也会终止。其中nohup 表示后台运行,关闭窗口后也也继续执行,&意思是终端连接的时候后台运行,终端断了进程也会停。具体解决方法是使用nohup命令,在窗口程序的前面加上nohup,程序的后面加上&,这样程序就会一直执行直到结束,而不会因为关闭窗口程序而停了。...
2019-04-30 09:34:48
4292
原创 html前端背景页面固定并且不重复
<body class="gray-bg" background="${ctxPath}/static/img/wms.png" style="background-attachment: fixed;background-repeat: no-repeat;background-size: 100% 100%">background-attachment:背景滚动模式back...
2019-04-18 18:31:29
1638
原创 bootstrapValidator前端参数校验
<div class="form-horizontal" id="warehouseInfoForm"></div>/** * 初始化仓库档案详情对话框 */var TCommonWarehouseInfoDlg = { tCommonWarehouseInfoData : {}, validateFields:{ whouseC...
2019-04-16 11:40:47
336
原创 case when then
select (case w.whouse_state when 10 then '可用' when 20 then '关闭' when 30 then '在建' end) as whouseStatefrom t_common_warehouse w
2019-04-15 23:27:03
289
原创 下拉框三级联动,数据库动态获取数据(springboot+ajax+html)
页面:<#select id="whouseUuid" name="选择仓库" underline="true"> <option value="">请选择</option></#select><#select id="regionUuid" name="选择库区" underline="true"> <...
2019-04-15 23:21:47
5784
4
原创 input隐藏域传值给后台
<input type="hidden" id="whouseUuid" value="${item.whouseUuid}">
2019-04-15 22:58:48
3317
原创 Pycharm安装后报错:No R interpreter defined:
刚安装好Pycharm后,右下角出现报错:No R interpreter defined: Many R related features like completion, code checking and help won’t be available. You can set an interpreter under Preferences->Languages->R这是...
2019-04-04 17:09:32
480
原创 echarts饼图动态数据加载
前台页面:<%@ page contentType="text/html;charset=UTF-8" language="java" %><% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+...
2019-03-30 14:41:11
4330
原创 SSM+echarts动态实现数据展示
前台页面:<%@ page contentType="text/html;charset=UTF-8" language="java" %><% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+...
2019-03-22 18:30:43
3111
原创 jps命令找不到,需在linux下配置java环境
1.先下载好JDKJava SE 8的官方网址是http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html2.解压文件[root@acb40835 software]# tar -xvf jdk-8u65-linux-x64.tar.gz3.添加环境变量[root@acb40835...
2019-03-20 09:56:57
1884
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人