自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

henry

好记性不如烂笔头!

  • 博客(57)
  • 资源 (2)
  • 收藏
  • 关注

原创 springboot/mybatis之多数据源配置

注:数据源切换不可在事务内部、同一事务中数据源确定、不可切换!亦可说数据源切换必须在事务处理之前!一、功能介绍 在实际的开发中,同一个项目中使用多个数据源是很常见的场景。最近在项目中正好使用到多数据源、搭建完成后记录一下!可供参考。二、配置文件application.yml中添加多数据源配置spring: application: name: businesscooperation-server-dev main: allow-b...

2020-07-02 11:35:42 328

原创 vue 判断是否为微信浏览器 and 判断是否为手机 ipad (记录)

isWenXin: function () { if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { return true; // 是微信端 } else { return false; } }, isMobi...

2019-12-25 10:32:33 2348

原创 vue nuxt.js springmvc 前后端分离 微信扫码登录

在微信开放平台 配置回调域名在 nuxt 配置中引入 wxLogin.jshead: { script: [ { src: 'https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js' } ] }nuxt.js 使用wxLogin.js 加载二维码<div class="l...

2019-12-25 10:22:49 1697 1

原创 java8 stream lambda 数组 集合以特殊字符 转字符串

public static void main(String[] args) { int[] arr = {1, 2, 3, 4}; String str1 = Arrays.stream(arr).boxed().map(i -> i.toString()).collect(Collectors.joining(",")); Sys...

2019-05-08 10:14:38 9024

原创 spring boot 启用定时任务调取精伦IDR210阅读软件获取身份证信息 jna dll

注:使用时确定jdk为32位 使用绝对路径读取接口时 需要确定接口文件存放位置1、引入jna.jar<dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId> <version>4.1.0...

2019-03-21 13:36:05 1816 6

转载 js 获取本机ip地址

function getIPs(callback){ var ip_dups = {}; //compatibility for firefox and chrome var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || wind...

2019-03-21 13:19:54 7085 5

原创 lombda 表达式 简单使用 (List 记录篇)

1、 List集合对象中获取对象中某个字段的数据转集合List<PageDto> resultList = xxx.queryAll();List<String> list = resultList.stream().map(r -> r.getUrl()).collect(Collectors.toList());2、List 集合数据过滤 获取过滤后...

2019-03-14 13:54:39 3281

原创 linux 远程拉取码云上git代码 shell脚本

#/bin/sh# git yum安装 检查git 是否存在 存在不安装git --versionif [ $? -ne 0 ];thenyum install gitif [ $? -ne 0 ];then echo "yum安装失败!" exit 0fifigetParam(){read -p $1 param errorif [[ $error =~ ...

2019-03-05 17:59:39 5372

原创 linux使用shell一键安装git

git_dir="/home/software"if [ ! -d "$git_dir" ];then mkdir -p $git_dirficd $git_dirgit_gz=$(find `dirname $git_dir` -name *git*.tar.gz)if [ ! -e "$git_gz" ];then wget -O git-2.17.0.tar....

2019-03-05 17:57:21 840 1

原创 jquery 制表 合并行

function merge(){ var columsIndex = [0,9];//需要合并的列索引值 for (var k = 0; k &lt; columsIndex.length; k++) { var mergeIndex = 0;//定位需要添加合并属性的行数 var mark = 1; //计算每次需要合并的格子数 var trArr = $("#tableBo...

2018-12-08 16:44:46 212

转载 VUE开发环境搭建(DOS安装)

1、安装node.js:(下载地址)  (中)https://nodejs.org/zh-cn/   (英)https://nodejs.org/en/2、安装cnpm(淘宝镜像) :    npm install -g cnpm --registry=https://registry.npm.taobao.org3、安装Vue:    cnpm install vue4、...

2018-11-20 12:23:21 367 1

原创 idea Lombok @Getter @Setter自动解析

idea — setting — plugins, 如果出现No plugins found,Search in repositories就直接点开Search in repositories双击Lombok Plugin 安装完成后 close重启就ok了! 

2018-08-03 16:17:21 3942

转载 IDEA 2018 激活破解方法(包含最新License server)

注:建议用方法三破解 《License server 激活不太稳定》JetbrainsCrack-3.4-release-enc.jar下载地址:链接: https://pan.baidu.com/s/1Q4AlnZguZAhz50CYng__IQ 提取码: rv8nwebstorm 激活破解方法在打开Webstorm时,的License Activation窗口中选择“Lice...

2018-08-02 10:27:16 42983 9

原创 SpringBoot项目在IntelliJ IDEA 2018 中实现热部署

一、开启idea自动make功能 1、打开 file -- &gt; settings   查找 Gradle-Android Compiler2、CTRL + SHIFT + A --&gt; 查找Registry --&gt; 找到并勾选compiler.automake.allow.when.app.running最后重启idea二、使用spring-boot有的热部...

2018-08-01 17:18:28 2941

原创 Intellij IDEA springboot 找不到或无法加载主类

1、File -- &gt; Project Structure2、检查Artifacts再试试吧!

2018-08-01 15:46:13 19158 6

原创 linux mysql启动异常:The server quit without updating PID file

[root@henry mysql]# service mysql startStarting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/henry.pid).检查安装目录下的 xxx.err 文件 &lt;/usr/local/mysql/data/xxx.err&gt;201...

2018-07-11 11:24:48 4960

原创 SSM之Service层抽取成BaseService和BaseServiceImpl与mapper层抽取 BaseMapper

1、BaseServicepackage dataSource;import data.page.PageImpl;import data.page.Pageable;import java.io.Serializable;import java.util.List;/** * @author henry * @version V1.0 * @Title: BaseService * @Packa...

2018-04-19 10:27:53 4958

原创 spring boot.2x 启用拦截器配置 静态资源不能访问

今天在使用SpringBoot时遇到静态资源无法访问的问题,启用拦截器配置就会出现静态资源无法访问。发现只要继承 WebMvcConfigurationSupport 并且将文件加入配置 发现如果继承了WebMvcConfigurationSupport,则在yml中配置的相关内容会失效。需要重新指定静态资源@Overrideprotected void addResourceHandlers(...

2018-04-11 16:04:31 3306 1

原创 spring boot.2x 集成swagger 加入拦截器后 swagger不能访问

忽略掉 swagger-resources下面的请求 以及忽略掉 v2下面的请求即可

2018-04-11 10:05:13 3340 1

原创 java HttpClient PostMethod使用

package com.henry.util;import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpclient.HttpStatus;import org.apache.commons.httpclient.methods.PostMethod;import org.apache.co...

2018-04-09 15:52:15 4112

原创 IDEA 2017 SSM(Spring+SpringMVC+MyBatis)框架搭建

1、file--&gt;new--&gt;project     2、修改项目 maven地址File--&gt;settings    Resources 等同java目录操作 选择resources root 到此 一个基于idea搭建的maven项目生成成功  开始搭建 ssm项目1、配置需要的jar 修改 pom.xml&lt;project xmlns="http://maven.apa...

2018-04-04 11:23:03 540

原创 linux mysql 修改密码、连接权限、端口 基础操作

安装成功后修改默认密码1、进入 mysql安装目录/bin2、执行 ./mysql -u root -p3、切换数据库 use mysql;4、update user set password=PASSWORD('xxxxxx') where user='root';------------------------------------------------------------------...

2018-03-16 11:17:58 453

原创 linux使用shell一键安装tomcat 并更改访问端口为 80

#!/bin/shsduo susofeware_file="/home/sofeware"tomcat_dir="/usr/local/webserver/tomcat"get_tomcat_url=https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.79/bin/apache-tomcat-7.0.79.tar.gz...

2018-03-16 11:08:59 1530

原创 linux使用shell一键安装jdk

#sudo su#create java dirjava -versionif [ $? -eq 0 ]; then  read -p "The JDK already exists, do you need to continue to install it?(y/n) " name  if [ "n" = "$name" ]; then    exit 0  fifigetAZ_file=ht...

2018-03-16 11:04:23 1637

原创 MyEclipse创建maven项目

1、下载 Maven http://maven.apache.org/download.cgi,解压到任意非C盘位置2、打开 Myeclipse 中的菜单 Windows 》Preferences 》搜索“maven”,找到“Installations”,把刚才的 Maven 目录添加进去,并勾选。3、File--&gt;new--&gt;Project项目默认目录结构如下在 main 下创建 r...

2018-03-16 10:57:18 151

原创 linux使用shell一键安装mysql

#!/bin/shgroup=mysqluser=mysql#create group if not existsegrep "^$group" /etc/group &gt;&amp; /dev/nullif [ $? -ne 0 ]then  groupadd $groupfi#create user if not existsegrep "^$user" /etc/passwd &gt;&a...

2018-03-16 10:30:43 1220

原创 linux shell 安装webbench压测工具

#!/bin/shsofeware="/home/sofeware"zxFile="/usr/local/man/man1"if [ ! -d "${sofeware}" ];then  mkdir -p ${sofeware}ficd /home/sofewarewget http://zyan.cc/soft/linux/webbench/webbench-1.5.tar.gz...

2018-03-15 16:02:09 206

原创 linux使用shell脚本安装redis 4.0.6

#!/bin/shsofeware_file="/home/sofeware"get_redis_url="http://download.redis.io/releases/redis-4.0.2.tar.gz"redis_dir="/usr/local/webserver/redis"if [ -n "$1" ];then  get_redis_url=$1fiif [ -n "...

2018-03-15 15:55:25 565

原创 centOS7 iptables防火墙配置脚本

#先检查是否安装了iptablesservice iptables statusif [ $? -eq 0 ];then echo "已安装了iptables"else #安装iptables yum install -y iptables #安装iptables-services yum install iptables-services #禁用/停止自带的firewall

2017-07-25 12:58:00 1013

原创 Shell脚本 centOS7中自动安装Tomcat7

#切换sduo sutomcat_dir="/usr/local/tomcat"#创建tomcat文件夹if [ ! -d "$tomcat_dir" ];then mkdir $tomcat_dirficd $tomcat_dir#远程获取tomcatif [ ! -d "apache-tomcat-7.0.79.tar.gz" ];then wget https

2017-07-25 08:33:32 379 1

原创 Shell脚本 centOS7中自动安装JDK

#切换到root权限sudo su#create java dirjava_file="/usr/local/java"if [ ! -d "$java_file" ];then mkdir $java_fileficd /usr/local/javaif [ ! -f "jdk-8u131-linux-x64.tar.gz" ];then wget --no...

2017-07-24 13:27:24 4787 2

原创 tomcat导入maven项目运行抛出org.springframework.web.context.ContextLoaderListener not found

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener根本原

2016-07-23 10:38:29 353

原创 Java使用Jedis操作Redis

使用Java操作Redis需要jedis-2.7.3.jar如果需要使用Redis连接池的话,还需commons-pool2-2.3.jar,下载地址:http://pan.baidu.com/s/1bp1FgM7package com.henry.redis;import redis.clients.jedis.Jedis;import redis.clients.jedis.

2016-07-16 14:53:38 1046

原创 redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

昨天在测试redis一个劲的报出redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool查了一下午的百度,发现没有一个是能解决我这个异常抛出的 ;因为我的reids是安装在linux上的。 所以我获取连接的时候 // 初始化 public Red

2016-07-16 09:55:43 971

原创 myeclipse+tomcat 启动项目访问时怎样才能不加项目名直接访问

1、首先找到使用的tomcat(因为我电脑上装了多台tomcat所以先找到使用的这个tomcat)window-->preferences-->2、修改这台tomcat的server.xml文件原文件截图:修改后的文件截图:ok!完成了!重启项目  直接访问试试吧!

2016-07-07 13:07:12 6142 2

原创 MyEclipse SSM(Spring+SpringMVC+MyBatis)框架搭建

1、maven引入需要使用的jarpom.xml 4.0.2.RELEASE 3.2.6 1.7.7 1.2.17 junit junit

2016-07-04 11:21:01 6993

原创 MyEclipse创建maven项目

1、下载 Maven http://maven.apache.org/download.cgi,解压2、打开 Myeclipse 中的菜单 Windows 》Preferences 》搜索“maven”,找到“Installations”,把刚才的 Maven 目录添加进去,并勾选。3、File-->new-->Project项目默认目录结构如下

2016-07-04 10:20:48 321

转载 Redis介绍及常用命令

一 Redis介绍 Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。从2010年3月15日起,Redis的开发工作由VMware主持。 Redis能运行在大多数POSIX(Linux, *BSD, OS X 和Solaris等)系统上,官方没有支持Windows的版本。目前最新

2016-06-28 17:02:54 344

原创 Aliyun linux5.7 64位安装 reids3.2.1

1、下载redis安装包 下载路径http://redis.io/download 我使用的是redis3.2.12、传递到linux服务器中的home目录下3、解压 tar zxvf redis-3.2.1cd redis-3.2.1编译: makecd src &amp;&amp; make install4、移动文件,便于管理mkdir -p /usr/local/redis/...

2016-06-21 15:03:58 289

原创 java读取文件内容按照值出现的次数排序

import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.ArrayList;import java.util.Collections;import java.util.Comparator;import java.util.HashMap;i

2016-06-18 13:47:05 1511

安卓伪加密工具

安卓伪加密工具

2015-08-06

第三方和包支付的实现

订单支付:即用户在网上购物时向商家支付订单货款的工具,具备从用户账户(和包账户或银行卡账户)扣款并划入商户和包账户的能力,适用于网上购物付款、应用下载付费、定期扣款等多种应用场景。

2015-08-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除