`
文章列表
1.限流类 package com.leimingtech.admin.utils; import com.google.common.util.concurrent.RateLimiter; import com.leimingtech.core.cache.jedis.JedisUtils; import com.leimingtech.extend.module.payment.wechat.mobile.util.MD5Util; import lombok.extern.slf4j.Slf4j; import javax.servlet.http.HttpServletReques ...
实现代码在附件中 1.自定义注解文件 package sgnctest.el; import java.lang.annotation.*; /** * Author by gjp, Date on 2019/9/16. */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface MyCache {     //key 值     String key() default "";     //缓存前缀     String pr ...
1.需要在rabbitmq 管理界面上,定义用户和 Virtual host 登录地址:http://localhost:15672/ 用户名为:gjpztb;密码:gjpztb; Virtual host 实现代码在附件中 2.建立maven 项目: <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:rabbit="ht ...
1. 配置文件:         <!-- 批量保存系统设置 -->     <insert id="saveBatch" param<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper ...
package com.gpcsoft.hct.epp.egp.thread; import com.gpcsoft.hct.epp.egp.HttpClientBailApi; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.concurr ...
1. package gjp.tools; import com.alibaba.fastjson.TypeReference; import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.Lock; /** * @Auther: gaojp * @Date: 2019/4/4 15:12 * @Description: * 使用模板设计: * 实现防止缓存被击穿的实现 * */ public class CommPlate {     //缓存数据    priva ...
package gjp.tools; /** * @Auther: gaojp * @Date: 2019/3/13 09:15 * @Description: */ import org.apache.commons.codec.binary.Base64; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; im ...
<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.6</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient< ...
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.6</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpc ...
方式一 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); // 这是优先选择. 如果不允许DTDs (doctypes) ,几乎可以阻止所有的XML实体攻击 String FEATURE = "http://apache.org/xml/features/disallow-doctype-decl"; dbf.setFeature(FEATURE, true); FEATURE = "http://xml.org/sax/features/external-general-ent ...
配置如下: server {     listen       80;     server_name  localhost;           return 301 https://localhost$request_uri;      charset UTF-8;     location / {       root   html;                  # 这个是指定一个项目所在目录       index  index.html index.htm;  # 这个是指定首页的文件名     } } server {     listen       80 def ...
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupI ...
package com.gpcsoft.xjmodule.utils; import java.io.File; import java.io.IOException;  import java.net.URLEncoder; import java.nio.charset.Charset; import java.security.KeyManagementException;  import java.security.KeyStoreException;  import java.security.NoSuchAlgorithmException;  import java.s ...
一,搭建zookeeper集群 1.下载zookeeper解压3份,分别重命名为zookeeper-3.4.10-42181,zookeeper-3.4.10-42182,zookeeper-3.4.10-42183(4218* 表示连接端口) 2. 进入D:\mysoftsetup\solr-colud\zookeeper\zookeeper-3.4.10-42181\conf目录修改 (zookeeper-3.4.10-42182,zookeeper-3.4.10-42183操作类似) zoo_sample.cfg 修改为:zoo.cfg 修改如下: #保存数据路径 dataDir=D:/m ...
1.下载 Elasticsearch ,下载地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.1.zip 解压文件,进入bin目录 单击“elasticsearch.bat”启动。 2.启动后,在浏览器输入如下命令 1:查看是否部署成功   http://localhost:9200/   如下说明成功:   {   "name" : "l5YPTqU",   "cluster_name" : "elasticsearch&q ...
Global site tag (gtag.js) - Google Analytics