- 博客(118)
- 资源 (16)
- 收藏
- 关注
转载 VMware虚拟机centos6.5与主机设置在同一网段
https://blog.youkuaiyun.com/jamieblue1/article/details/97160919
2020-09-05 17:27:14
299
原创 对手机号脱敏
// 对手机号码实现脱敏String mobile = "18782766707"; String desensMobile = mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
2020-08-23 12:44:57
814
原创 springboot验证手机号
/** * 手机号码 */ @NotBlank(message = "手机号码不能为空") @Size(min = 11, max = 11, message = "手机号码长度不正确") @Pattern(regexp = "^(((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19[89]))\\d{8})$", message = "手机号格式错误") private String mobil
2020-08-23 11:43:19
4286
原创 springboot文件下载
/** * 下载文件 * * @param filepath * @throws WiiException */ @ApiOperation("下载文件") @GetMapping(path = "/doc_download") public ResponseEntity<FileSystemResource> downloadFile(@RequestParam("filepath") @ApiParam(name="
2020-08-21 17:41:11
189
原创 以json的格式返回数据
/** * 返回错误提示 * * @param errorMsg * @param httpServletResponse * @throws IOException */ public void resultError(String errorMsg, HttpServletResponse httpServletResponse) { httpServletResponse.setCharacterEncoding("U
2020-08-13 10:56:37
507
转载 centos中设置静态ip,IP地址还是没有发生变化,对此可修改以下
点开虚拟机,在菜单项里面 点 编辑===》虚拟网络编辑器,设置Vmnet0 桥接模式查看虚拟机网络适配器配置vmware的ip配置/etc/sysconfig/network-scripts/ifcfg-eth0文件,没有则创建。创建ifcfg-eth0文件cd /etc/sysconfig/network-scriptstouch ifcfg-eth0对ifcfg-eth0文件进行编辑注意:文件原有的配置项value不符合可以修改,不要删除原有的配置项。NAME=eth0 #
2020-08-13 10:10:42
2096
原创 api接口鉴权代码
执行流程说明请看上一篇。本篇只涉及代码编写1、新建util。放入以下类BaseRedisServiceimport java.util.concurrent.TimeUnit;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.data.redis.core.StringRedisTemplate;import org.springframework.stereoty
2020-08-12 11:47:15
2488
1
原创 接口鉴权方式
当第三方访问我们的接口的时候,我们需要对传参进行参数校验,思路就是1、给第三方一个appid和app_secret。第三方首先根据app_id和时间戳timestamp和secret(secret = MD5(app_id+app_secret+timestamp)),去掉我们接口获取accessToken。注:accessToken有效性为2小时。2、第三方每次请求我们的接口的时候,都必须带上accessToken3、第三方需要对每次请求的参数,sign签名生成。sign签名生成规则:MD5(
2020-08-10 11:56:05
10547
原创 使用aop进行异步执行代码。@Async失效的时候用
1、annotation 包下package com.app.annotation;import java.lang.annotation.*;/** * 自定义异步注解,service.impl层打此注解 * */@Target({ElementType.METHOD, ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface AsyncAnnotation {}2、a
2020-08-10 11:20:11
1182
原创 Springboot中自定义注解时间校验
https://blog.youkuaiyun.com/liu19900205/article/details/81503511
2020-07-05 10:33:34
2806
原创 HttpClientUtil类
package com.app.util;import java.io.IOException;import java.util.Map;import com.alibaba.fastjson.JSONObject;import lombok.extern.slf4j.Slf4j;import org.apache.http.HttpEntity;import org.apache.http.HttpStatus;import org.apache.http.client.config.Re
2020-06-29 20:36:33
177
转载 jdk1.8中stream用法
public static void main(String[] args) {//new一个list,给list添加三组值。List list = new ArrayList<>();VehicleInfo vehicleInfo = new VehicleInfo();vehicleInfo.setSysOrgId(100);vehicleInfo.setTerminalType(“2”);list.add(vehicleInfo);VehicleInfo vehicleInf
2020-06-19 09:33:42
332
转载 o(1), o(n), o(logn), o(nlogn)
描述算法复杂度时,常用o(1), o(n), o(logn), o(nlogn)表示对应算法的时间复杂度,是算法的时空复杂度的表示。不仅仅用于表示时间复杂度,也用于表示空间复杂度。O后面的括号中有一个函数,指明某个算法的耗时/耗空间与数据增长量之间的关系。其中的n代表输入数据的量。比如时间复杂度为O(n),就代表数据量增大几倍,耗时也增大几倍。比如常见的遍历算法。再比如时间复杂度O(n2),就代表数据量增大n倍时,耗时增大n的平方倍,这是比线性更高的时间复杂度。比如冒泡排序,就是典型的O(n2)的算法,
2020-05-27 14:39:46
240
转载 JDK动态代理和cglib动态代理
https://blog.youkuaiyun.com/flyfeifei66/article/details/81481222
2020-05-08 20:54:18
132
转载 java 多文件下载(不打包)
html:(layui+beetl)页面新增iframe,用来加载要下载的文件<iframe id="A" src="" style="display: none"></iframe><iframe id="B" src="" style="display: none"></iframe><iframe id="C" src="" st...
2020-03-26 11:24:47
1209
转载 Freemarker提供了3种加载模板目录的方法
Freemarker提供了3种加载模板目录的方法。 它使用Configuration类加载模板。三种方法分别是:public void setClassForTemplateLoading(Class clazz, String pathPrefix);public void setDirectoryForTemplateLoading(File dir) throws IOExceptio...
2020-03-25 17:56:50
695
原创 centos下修改hosts文件以及生效命令
位置:vim /etc/hosts修改完以后重启网络生效:/etc/init.d/network restart
2020-03-19 11:43:11
2361
转载 navicat中连接oracle报connection to server failed, probable Oracle Net admin error
https://blog.youkuaiyun.com/gaoying_blogs/article/details/45440797
2020-03-18 15:22:54
274
转载 centos中Nginx安装与启动
https://blog.youkuaiyun.com/sqlquan/article/details/101099850
2020-01-19 16:32:39
160
原创 centos6.9开放端口
https://blog.youkuaiyun.com/hwijew/article/details/83575237https://www.jianshu.com/p/79734f53f68c
2020-01-08 12:01:50
813
转载 centos7.0开放端口
方法1firewall-cmd --zone=public --add-port=6379/tcp --permanentfirewall-cmd --reload方法2CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。1、关闭firewall:systemctl stop firewalld.servicesystemctl disab...
2020-01-07 21:35:03
161
转载 如何使VMware ip与本机ip处于同一网段
地址:https://www.cnblogs.com/cztisthebest/p/7833421.html进入 vim /etc/sysconfig/network-scripts/ifcfg-eth0 进行编辑,如没有则touch1、编辑如下(最主要的):NAME=eth0 文件名 DEVICE=eth0 设别名 IPADDR=192.168.1.188 想要设定的ip地...
2019-12-23 17:20:03
806
原创 postgresql数据库下使用dblink
#创建扩展(必须)create extension dblink;#创建连接SELECT dblink_connect('mycooaaaaan','hostaddr=172.20.10.3 port=5432 dbname=aaa user=postgres password=111111'); #查询select * from dblink('mycooaaaaan','se...
2019-12-19 19:20:04
394
转载 linux下安装postgreSQL
https://blog.youkuaiyun.com/ckc_666/article/details/84974264
2019-12-09 14:44:44
112
原创 layui中子页面调用父页面
父页面layui.use(... function(){ var _tools = { func1: function(){ console.log('func1'); } } window.tools = _tools;})// 外部调用,如子页面parent.tools.func1();
2019-12-03 18:51:12
1499
原创 JAVA导出Excel
导包:<!--excel导入导出 start--><dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.15</version></dependency&...
2019-11-18 10:41:28
151
转载 java中SSM框架解决跨域问题
新建一个过滤器,并实现 Filter 接口public class SimpleCORSFilter implements Filter { private boolean isCross = false; @Override public void destroy() { isCross = false; } @Override...
2019-11-18 10:08:06
462
原创 java使用redis
所需要的包:jedis-2.1.0.jarcommons-pool-1.5.5.jarRedisUtil类import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.ObjectInputStream;impo...
2019-11-18 09:57:39
92
原创 BufferedReader、BufferedWriter读写文件
public static void main(String[] args) { File file = new File("D:\\test.txt"); //写 String[] strs = {"咋杀手实打实大所22","sdasdasd11","炸死你搭嘎手打22"}; FileWriter fw = null; ...
2019-10-25 15:05:05
554
原创 Nginx常见命令
一、在usr/local/nginx/sbin中nginx常用命令如下1、nginx查看版本号:./nginx -v2、nginx启动./nginx3、关闭nginx./nginx -s stop4、重启nginx./nginx -s reload二、nginx配置文件(usr/local/nginx/conf/nginx.conf)有三部分组成第一部分 全局快从配置文件...
2019-10-08 18:36:12
154
原创 dom4j解析xml文件
引包: <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> </dependency>@Test public void test1()...
2019-09-29 16:15:21
118
转载 CentOS7使用firewalld打开关闭防火墙与端口
1、firewalld的基本使用启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld开机启用 : systemctl enable firewalld 2.systemctl是CentOS...
2019-09-23 16:11:20
697
转载 Linux中jar包启动和jar包后台运行
Linux中jar包启动和jar包后台运行Linux 运行jar包命令如下:方式一:java -jar shareniu.jar特点:当前ssh窗口被锁定,可按CTRL + C打断程序运行,或直接关闭窗口,程序退出那如何让窗口不锁定? 方式二java -jar shareniu.jar &&代表在后台运行。特定:当前ssh窗口不被锁定,但是当窗口关...
2019-09-23 11:19:39
775
原创 SpringBoot中使用拦截器拦截跳转登录
拦截器以及界面位置效果:访问main.html时会进行拦截,判断是否存在用户,不存在则跳转登录登录成功跳转成功页面1、写一个登录拦截类LoginInterceptor实现HandlerInterceptor@Componentpublic class LoginInterceptor implements HandlerInterceptor { //这个方法是在访问接口...
2019-08-29 23:07:00
6701
2
转载 SpringBoot拦截器
https://blog.youkuaiyun.com/qq_30745307/article/details/80974407
2019-08-29 10:23:47
114
原创 uni-app组件传递
父页面引入<template> <view class="container"> <date-dormatter :dateStr="1545903266795"></date-dormatter> </view></template><script>import dateDormatter fr...
2019-08-18 11:16:04
339
原创 小程序文字超出部分省略号
<text class="yichu" >ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss</text>.yichu{ display: -webkit-box; overflow: hidden; text-overflow: ellipsis; word-wrap: ...
2019-08-13 17:17:02
304
excel自动生成创建表语句mysql,sqlserver.xlsm
2019-10-24
excel自动生成创建表sql语句,支持MySql,Oracle,SQLServer三种创建方式,方便管理
2019-01-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人