自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

JasonYao的程序猿路

记录工作中积累的经验和问题

  • 博客(133)
  • 资源 (22)
  • 问答 (3)
  • 收藏
  • 关注

原创 springboot @Async自定义一个可以顺序执行线程的执行器

自定义执行器@EnableAsync@Configurationpublic class SpringAsyncTaskConfiguration { @Primary @Bean public TaskExecutor taskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(8);

2022-03-06 03:33:40 1183 1

原创 踩坑记录:layui动态添加的radio没法赋值

首先申明一下我用的layui版本是2.4.5页面上的radio选项是动态生成的,默认生成的都是不被选中的,编辑的时候会从后台拿到选中的记录ID通过form.val方法赋值最后调用 form.render(‘radio’) 重新渲染。发现始终都选不上,最后发现后台传输给前台的json数据里字段类型是int类型的,int类型的赋值layui不工作,所以始终就勾选不上。解决办法调用form.val方法的时候,传入的参数加一个.toString()方法转换成string类型的就行了。...

2020-10-23 00:42:02 1416

原创 分享一个自动化生成CRUD的客户端工具

分享一个我二次开发后的自动化生成代码的工具,可以生成页面和全部后端代码:代码地址:https://github.com/jasonsuzhou/mybatis-generator-gui-extension页面和代码可以根据自己系统的要求定制模板基本围绕自定义字段做的二次开发,可以灵活的生成页面端的代码:searched 勾选说明要在页面生成查询的表单字段required 根据数据库设定的NOT NULL属性,自动给勾选,页面会生成必填字段的校验逻辑PageType 页面生成什么样的元素,

2020-10-21 13:25:02 658

原创 ELK 初体验

想把log统一管理起来,第一个想到的就是ELK了。先下载解压缩filebeatcurl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.7.2-linux-x86_64.tar.gztar xzvf filebeat-6.7.2-linux-x86_64.tar.gz修改配置文件, 默认的配置...

2019-09-17 00:56:50 1623 2

原创 Springboot2集成Quartz异步执行不生效

写了好几个task,我期望各个类里的task可以异步执行的,所以在类上加入了@EnableAsync注解,然而实际测试出来并没有效果,这个注解是需要加在启动类上的。加在task类上的应该是@AsyncSpringboot2集成Quartz异步执行步骤pom引入依赖:<dependency> <groupId>org.springframework.boot<...

2019-02-01 00:28:53 3570 12

原创 MySQL报错error near where not exists

5.6版本和5.7版本的写法不一样,高版本的不能到低版本执行。5.7 版本INSERT INTO USER (name, email) SELECT 'John', '[email protected]' WHERE NOT EXISTS (SELECT id FROM USER WHERE email = '[email protected]');5.6版本INSERT I...

2018-11-29 16:19:47 1844

原创 用spring反射的时候用e.getMessage得到的是null

现有系统里面用了很多类似如下的打印log的方式:try {} catch (Exception e) {logger.error(e.getMessage());}但事实上spring反射调用的时候如果代码中有异常抛出的话是InvocationTagetException类型,而这个类型并没有覆写getMessage()方法,所以现在系统中的log打出来是信息是null,返回null的话...

2018-11-23 17:45:19 1003 1

原创 springboot2+ integrate with liquibase

springboot already integrate with the liquibase, we just need some configurationpom.xml<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starte...

2018-10-13 00:24:14 499

原创 spring-boot2+ integrate with okhttp3 and AsyncHttpClient

application.propertiesspring.redis.host=192.168.1.103spring.redis.port=6379spring.redis.password=spring.redis.jedis.pool.max-active=100spring.redis.jedis.pool.max-idle=50spring.redis.jedis.po...

2018-09-09 15:54:24 706

原创 利用AtomicInteger实现高性能的ID生成器

废话不多说,直接上代码,目前该生成器用于生成流量平台的订单号:package com.base.common.util.idworker;import java.text.SimpleDateFormat;import java.util.Date;import java.util.concurrent.atomic.AtomicInteger;public class IdW...

2018-09-07 15:46:38 1701

原创 【备忘】执行一个csh做一些检查并且返回成功还是失败

#!/bin/cshif ($#argv != 2) then echo "Usage:/xx/taskrefchecker.sh slientmode[Y|N] logfilepath";endifsetenv silentmode $argv[1];setenv logfile $argv[2];/xx/jre7/bin/java -jar /xx/SeedParser.jar...

2018-09-05 11:17:17 1037

原创 【话费充值平台】话费充值平台接口设计

最近需要做一个话费充值平台,在此记录下整个过程。 预计做三个系统:接口平台,业务处理中心,后台管理。接口平台需求代理商通过约定的接口协议调用接口平台进行提单,接口平台需要对请求方做验证并且生成唯一订单号返回给代理商,代理商可以通过平台返回的订单号查询订单充值状态(处理中,充值失败,充值成功)。代理商通过约定的接口协议调用接口平台进行订单状态查询。代理商通过约定的接口协议...

2018-09-04 17:34:07 11534 18

原创 【流量帝】计算某一天每分钟的增量订单量用以展现曲线图

新建了存储每分钟订单量的表:CREATE TABLE `rpt_order_per_min` ( `minute_string` varchar(32) NOT NULL, `total_count` bigint(20) DEFAULT NULL, `creation_date` datetime DEFAULT NULL, PRIMARY KEY (`minute_st...

2018-09-04 10:14:43 790

原创 spring-boot integrate with archaius

PrerequistionI will use Consul-KV as the property source, you can refer to below article to setup the consul environment https://blog.csdn.net/yaominhua/article/details/82316287 Also you need inte...

2018-09-02 22:29:17 360

原创 spring-boot integrate with consul client

Setup the consul environmentPlease refer to below article https://blog.csdn.net/yaominhua/article/details/82316287Add dependency to pom.xml<dependency> <groupId>com.orbitz.c...

2018-09-02 17:40:26 633

原创 Ubuntu install consul cluster

Go to downloads page to download the correct version: https://www.consul.io/downloads.htmlI downloaded below version: https://releases.hashicorp.com/consul/1.2.2/consul_1.2.2_linux_386.zipunzip ...

2018-09-02 16:02:34 329

原创 spring-boot integrate with JedisCluster

Setup redis clusterPlease refer to https://blog.csdn.net/yaominhua/article/details/82229502Add dependency<dependency> <groupId>redis.clients</groupId> <artifactI

2018-08-31 00:46:03 177

原创 Redis cluster in a single machine

EnvironmentOS: Linux Redis: redis-3.0.5StepsInstall redisPlease refer to https://blog.csdn.net/yaominhua/article/details/49657923Create folderscd /home/jason/redis/mkdir cluster-...

2018-08-30 23:23:26 177

原创 spring-boot integrate with mybatis

Add below pom dependency<dependency> <groupId>org.springframework.boot&

2018-08-30 17:21:33 216

原创 spring-boot integrate with swagger

Add below dependency in pom.xml<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId></depen

2018-08-30 15:24:55 188

原创 zookeeper cluster in a single machine

EnvironmentOS:Ubuntu JDK: 1.8 Zookeeper: 3.4.12Stepsunzip the tar.gz and make 3 copiestar -xvf zookeeper-3.4.12.tar.gzafter copy there are 3 zookeeper folderszookeeper-1zookeeper-2...

2018-08-26 17:17:13 192

原创 (0)nacos 0.1.0 初探

基于Windows 7下载Nacos(nacos-server-0.1.0.zip)https://pan.baidu.com/s/1FsPzIK8lQ8VSNucI57H67A 解压Nacos,目录结构如图:Window系统进入bin目录后双击startup.cmd即可启动Nacos ServerNote:如果运行的时候报错:Unrecognized VM...

2018-07-27 15:44:04 5520

原创 直接通过response把文件内容下载到客户端

我自己备忘用的HttpServletResponse response = ServletActionContext.getResponse(); OutputStream out = response.getOutputStream(); response.reset(); String fileName = DateUtil

2017-02-23 16:32:20 4805 1

原创 使用聚合数据接口发送短信

前提条件到如下网址注册聚合数据账户https://www.juhe.cn/登录后进入个人中心进行企业认证认证成功后通过如下网址申请短信接口https://www.juhe.cn/docs/api/id/54等待接口审核通过后你会得到一个接口的appkey 配置框架参数在src.resource下面有一个juhedata_config.xml的配置文件<?xml version="1.0" e

2017-01-21 22:10:34 13018

原创 layer初体验之弹出一个删除确认界面

<html><head><link href="http://cdn.bootcss.com/layer/2.4/skin/layer.min.css"></link><script src="http://cdn.bootcss.com/jquery/2.2.0/jquery.js"></script><script src="http://cdn.bootcss.com/layer/2.

2016-11-28 12:35:28 7854

原创 CentOS6.5安装nginx

命令集合如下yum –y install prce*yum –y install openssl*yum install zlib*Go to website http://nginx.org/en/download.html to find the latest version download url: http://nginx.org/download/nginx-1.10.1.tar.

2016-09-11 16:23:47 471

原创 使用nginx后让tomcat的localhost_access_log获得真实IP

配置nginx在location节点下面加入如下代码proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;修

2016-09-11 15:52:41 4752

原创 CentOS6.5安装apr优化tomcat7性能

前言Tomcat 连接器有三种方式: bio、nio 和 apr,三种方式性能差别很大,apr 的性能最优, bio 的性能最差。 Tomcat 7 使用的 Connector 默认就启用的 apr 协议,但需要系统安装 apr 库,否则就会使用 bio 方式。 如果系统没有安装apr,那么在启动tomcat的时候,catalina.out会打印出如下语句:INFO: The APR base

2016-09-11 13:22:49 3098

原创 使用Quartz Scheduler 开发批处理任务

流量帝框架集成了Quartz Scheduler,并进行了简单的封装目前流量帝框架支持的脚本执行模式有如下几种:按需人工触发执行一次按每天什么时候执行按每间隔多少小时执行按每间隔多少分钟执行按每间隔多少秒执行自定义cron表达式执行下面就来介绍一下每一种模式的配置方式前提条件你需要写一个用来执行批处理任务的任务类, 在项目中继承如下抽象类并实现executeTask方法com.base

2016-08-27 01:58:46 3011

原创 微信配置模板消息进行订单消息推送[基于测试号]

首先在微信端配置好模板消息 内容如下,注意{{*.DATA}} 是固定写法,占位符,是需要被替换掉的内容。{{first.DATA}} 订单商品:{{keyword1.DATA}} 订单编号:{{keyword2.DATA}}支付金额:{{keyword3.DATA}} 支付时间:{{keyword4.DATA}} {{remark.DATA}}配置成功后记录下模板IDJava后台需要组

2016-08-08 21:32:54 20735 5

原创 使用阿里大于发送短信验证码

前提条件注册阿里大于(原名阿里大鱼),注册地址如下 https://www.alidayu.com/登录后前往应用管理 >> 应用列表 >> 创建你的应用 创建好应用之后点击设置按钮进入设置页面找到你的appkey 和 appSecret 进入配置管理 >>验证码 配置好短信签名和短信模板,这个需要审核,请等待审核通过。 请记录好配置的签名名称,我这里举个例子是 “个人测试” 点击配

2016-08-05 16:35:59 22793

原创 开发一个带UEditor的页面

背景UEditor是百度开放的一款所见即所得的富文本编辑器,流量帝框架已经集成了UEditor,下面来介绍一下如何开发一个带UEditor的页面前提假设你有一个字段description需要用UEditor实现将如下代码放入到页面的form表单里面<script id="description" name="description" type="text/plain"></script>后台代码可以

2016-08-05 12:16:44 1258

转载 UEditor第二次加载总是不渲染的解决方案

转载自 http://blog.csdn.net/zrk1000/article/details/46865093提出问题使用UEditor-1.4.3中遇到第一次跳转到使用UEditor的界面后,编辑器加载正常,返回后第二次再跳转到这个界面就出现UEditor无法正常加载,也没百度到答案,看UEditor源码,发现这样一段:/** * @file * @name UE

2016-08-04 13:02:54 12389 4

原创 Struts2 return JSON data and convert the date field

Configure the struts.xml to support return JSON dataThe package must extends struts-default,json-defaultMust define below result<result name="success" type="json"> <param name="root">dataMap</param

2016-07-30 10:34:18 699

原创 Ubuntu install SVN server and configure using http access

Install SVN Serversudo apt-get updatesudo apt-get install subversionsudo apt-get install apache2sudo apt-get install libapache2-svnCreate SVN user group and add www-data group to this groupsudo addg

2016-07-11 21:20:03 471

原创 java.security.ProviderException: java.security.KeyException

问题描述在centos系统上用openjdk1.7, 用https请求微信api,报错如下Caused by: java.security.ProviderException: java.security.KeyException at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:146

2016-07-05 13:02:02 7951 3

原创 Monitor the changes in EOImpl.java side

You can override the doDML method and get the changes before call super.doDML(); Code with example: @Override protected void doDML(int operation, TransactionEvent event) { if (operation ==

2016-03-16 10:11:53 538

原创 Python27 with Oracle Sample(Windows OS)

Install oracle clientDownload url: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html Extract the zip file, and configure the file path to system environmentRestart

2016-02-25 15:55:54 881

原创 Python module “cx_Oracle” module could not be found

The detail error message show below:ImportError: DLL load failed: The specified module could not be found.Solution (for windows OS)Download the oracle client from Oracle ClientExtract the zip file an

2016-02-25 10:14:46 1683

原创 Python2.7 with MySQL Connector/Python Sample(Windows OS)

Install the MySQL ConnectorDownload URL: https://dev.mysql.com/downloads/connector/python/ Platform: Microsoft WindowsDownload Version: Windows (x86, 32-bit), MSI Installer Python 2.7Download Packa

2016-02-22 17:19:22 931

IBMMQ配置SSL连接

手把手教你怎么配置IBM WEBSPHERE MQ通过SSL连接,附详细步骤和实例代码

2018-08-30

从0开始学架构笔记,架构设计模板

李运华老师的《从0开始学架构》的学习笔记,架构设计模板

2018-08-22

WIN7安装gradle环境

手把手文档教你在windows7系统安装gradle,并且列出常见问题

2018-08-22

从0开始学架构,架构备选方案评估模板

李运华《从0开始学架构》学习笔记,架构备选方案评估模板

2018-08-22

手机号码归属地更新到2018年4月387695条

移动号段: 134 135 136 137 138 139 147 150 151 152 157 158 159 172 178 182 183 184 187 188 198 联通号段: 130 131 132 145 155 156 166 171 175 176 185 186 电信号段: 133 149 153 173 177 180 181 189 199 虚拟运营商: 170

2018-06-28

从0开始学架构的学习笔记,FMEA方法论的实战应用

从0开始学架构的学习笔记,FMEA方法论的实战应用。详细记录了应该使用什么办法去排除一些高可用的隐患。

2018-06-28

微信网页授权获取用户信息,微信登录的实现

微信网页授权API使用 第三方网站获取微信用户信心并实现微信登录

2016-03-10

不要密码登录linux服务器

手把手教你怎么生成公钥和私钥。 手把手教你怎么在服务器配置公钥。

2015-12-03

Ubuntu1210中安装配置MySQL

手把手教你怎么在Ubuntu环境中安装Mysql数据库。 并且修改配置使能够远程链接

2014-03-20

Ubuntu1210利用thunderbird收发邮件

手把手教你怎么在ubuntu中配置邮件客户端进行收发邮件。

2014-03-03

Ubuntu12.10中安装Chrome浏览器

手把手教你怎么在ubuntu环境安装chrome浏览器

2014-02-26

Ubuntu12.10安装和卸载QQforLinux

手把手教你在Ubuntu中安装和卸载qq for linux 图文并貌。

2014-02-13

Ubuntu中支持中文输入法

手把手教你在Ubuntu中怎么打中文,图文并貌

2014-02-07

在VMware中安装Ubuntu12.10

手把手教你怎么在VMware中安装Ubuntu操作系统。

2014-02-07

Eclipse中开发JBPM5工程并部署到Guvnor

在之前的手把手教你安装JBPM5.4文档的基础上新增了如何在Eclipse开发新的JBPM工程,并部署到Guvnor仓库中。

2013-03-18

SOA嵌入JCE功能

实现SOA架构的时候怎么把JCE的功能添加进去

2013-02-26

手把手教你安装JBPM5.4,手动安装(by Jason)

手动安装JBPM5.4 不用自动下载安装Eclipse 和 JBOSS,指导调试第一个sample,常见错误的解决办法。

2013-02-26

手把手教你在Eclipse上用SVN

从安装Eclipse开始一步步讲解如何安装SVN和如何使用SVN

2012-11-30

Eclipse 远程调试

一个文档,详细的说明了怎么进行远程debug

2011-12-30

dom4j 工具类

封装dom4j 实现了一些实用的操作xml的方法

2011-09-29

动态加载jar包的实现

一个工具类实现了动态加载jar包 在不重启服务器的情况下,可以调用jar包的class

2011-04-13

银行家算法的模拟实现

模拟实现了银行家算法的实现。 采用的语言是java语言。

2011-02-19

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

TA关注的人

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