自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 资源 (9)
  • 收藏
  • 关注

原创 go:插入排序

func charusort(a []int) { fmt.Println(a) index := 0 for i := 0; i < len(a); i++ { index = i for j := i; j > 0; j-- { if a[index] < a[j-1] { a[index], a[j-1] = a[j-1], a[index] index = j - 1 } } fmt.Println(a) }}

2021-06-26 14:49:26 140

原创 go 选择排序

func xuanzesort(a []int) { fmt.Println(a) index := 0 for i := 0; i < len(a); i++ { for j := i; j < len(a); j++ { if a[index] > a[j] { index = j } } a[i], a[index] = a[index], a[i] }}

2021-06-26 14:48:43 131

原创 go:冒泡排序

func maopao(a []int) { fmt.Println(a) for i := 0; i < len(a); i++ { for j := 1; j < len(a)-i; j++ { if a[j-1] > a[j] { a[j-1], a[j] = a[j], a[j-1] } } } fmt.Println(a)}

2021-06-26 14:46:48 155

原创 动态代理 jdk及cglib 总结

jdk动态代理(必须有接口)https://blog.csdn.net/lihuayingmail/article/details/116892148cglib动态代理实例(不用接口)https://blog.csdn.net/lihuayingmail/article/details/116892736

2021-05-16 15:14:44 247

原创 cglib动态代理

import lombok.Data;@Datapublic class User { private String name; public User() { } public User(String name) { this.name = name; }}public class UserImpl { @Override public void addUser(User u) { Syste...

2021-05-16 15:11:46 298

原创 jdk原生动态代理

import lombok.Data;@Datapublic class User { private String name; public User() { } public User(String name) { this.name = name; }}public interface IUser { public void addUser(User u);}public class UserImpl im...

2021-05-16 14:54:44 337

原创 编程式事务

2021-05-16 14:26:13 64

原创 服务直接调用,多线程获取服务信息

2021-05-16 11:26:46 82

原创 java虚拟机层面解决同步问题

1.通过synchronized锁进行同步2.通过lock锁来实现

2021-05-16 10:52:17 96

原创 maven 编译 程序包javax.servlet.http不存在

出现以下问题:程序包 javax.servlet 不存在程序包 javax.servlet.http 不存在等问题。其原因是java编译器没有找到软件包javax.servlet。下载servlet.jar放到lib下没有效果,后发现需要在jdk中添加,如下:...

2021-04-02 11:31:33 1326

原创 jre替换local_policy.jar和US_export_policy.jar

这两个文件太难找了直接分享给大家链接:https://pan.baidu.com/s/1A6NehY5xEdA8AH5aGNwqeA提取码:d3qt

2020-11-19 17:48:52 822 2

原创 将jar包生成到仓库中

mvn install:install-file -DgroupId=com.tencent -DartifactId=xinge -Dversion=1.1.6 -Dpackaging=jar -Dfile=D:\lib\xinge-1.1.6.jar

2020-07-10 15:40:44 154

原创 jenkins maven

java.lang.UnsatisfiedLinkError: /usr/java/jdk/jre/lib/amd64/libawt_xawt.so: libXi.so.6: cannot open shared object file: No such file or directoryUbuntu14.04 x64jenkins-2.32.1错误1:AWT is not properly configured on this server. Perhaps you need to run ..

2020-05-09 20:21:29 260 1

原创 微信小程序 open-type=contact

<button open-type='contact' bindcontact="handleContact" show-message-card send-message-title="测试发送信息" send-message-path="/pages/accountlist/accountlist" ...

2020-04-17 10:48:07 11049

原创 redis中的scan替代keys

public class RedisTest { public static void main(String[] args) { JedisTestUtil jedisUtil = JedisTestUtil.getInstance(); Jedis jedis = jedisUtil.getJedis(); jedis.flushAl...

2019-12-18 14:54:53 398

原创 redis 发布订阅消息 springboot2

import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.data.redis.connection.RedisConnectionFactory;import org.s...

2019-10-17 15:43:00 135

原创 Jedis 发布订阅消息

import redis.clients.jedis.Jedis;import redis.clients.jedis.JedisPool;import redis.clients.jedis.JedisPoolConfig;public class Sub extends Thread { private final JedisPool jedisPool; ...

2019-10-17 15:41:09 233

原创 mongodb如何配置到服务里面

mongod --config C:\data\etc\mongo.conf --dbpath C:\data\db --logpath C:\data\logs\mongo.log --bind_ip 0.0.0.0 --install --serviceName "mongodb"--bind_ip 绑定服务IP,若绑定127.0.0.1,则只能本机访问,若绑定0.0.0.0,则默认可以...

2019-09-28 16:53:12 250

原创 disruptor 生产者消费者

package hua;/** * 事件 */public class LongEvent { public String name; public long value; public long getValue() { return value; } public void setValue(long value) {...

2019-09-04 17:01:26 275

原创 tomcat指定项目路径,不加项目名称

<Context path="" reloadable="false" docBase="D:\\program\\gongshi\\program"> <Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/></Conte...

2019-08-20 16:31:04 422

原创 SpringBoot的ApplicationRunner

在开发中可能会有这样的情景。需要在容器启动的时候执行一些内容。比如读取配置文件,数据库连接之类的。SpringBoot给我们提供了两个接口来帮助我们实现这种需求。这两个接口分别为CommandLineRunner和ApplicationRunner。他们的执行时机为容器启动完成的时候。这两个接口中有一个run方法,我们只需要实现这个方法即可。这两个接口的不同之处在于:ApplicationRu...

2019-08-20 14:22:22 238

原创 nginx 配置转发

worker_processes 1;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_...

2019-08-07 18:48:51 516

原创 centos 打包

tar -zcvf 文件名.tar.gz 要压缩的文件/文件夹tar -zcvf node.tar.gz node

2019-07-31 11:56:14 464

原创 idea 配置tomcat出现问题记录

Pass environment variablesenvironment variable name is not set一定要配置红色地方

2019-07-25 10:44:18 4644 3

原创 用idea创建一个maven web项目

archetypeCatalog=internal

2019-07-25 09:17:50 154

原创 jedis 排序 zrangeByScore zrevrangeByScore

import java.io.Serializable;public class User implements Serializable { private String id; //编号 private String name; //姓名 private double score; //得分 private int rank; //排名 public Us...

2019-07-24 18:35:12 1705

转载 Guava小工具之Interners

大家都知道,String是final的,每次对它的操作都会产生新的String,这很大程度上是安全性的考虑,但是产生大量的String也是会有一些问题的,1.大量的String会对gc产生影响;2.两次 new String(“aa”)操作,产生的String不一样,如果用这两个去做synchronized(String)操作就达不到想要的效果,因为synchronized必须是对同一个对象进行...

2019-07-13 16:59:06 666

原创 springboot2 打包成war包,放到tomcat中运行

<packaging>war</packaging><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- ...

2019-07-11 18:09:46 347

原创 出现无法加载activemq出错的原因

将true修改为false,我没有使用池Field jmsTemplate in .impl.QueueProduceImpl required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found.The injection point has the...

2019-06-21 16:07:21 1603

原创 activeMq问题记录 Cannot send, channel has already failed: tcp://127.0.0.1:8161

http://localhost:8161(管理端口)tcp://127.0.0.1:61616(服务端口)

2019-06-21 14:29:27 13249

原创 redis哨兵模式 sentinel

在上一篇备份的主从配置后https://blog.csdn.net/lihuayingmail/article/details/92402970上面上一篇备份主从,从库作为一个“备胎”,可以在需要的时候“顶上来” 。 配置的主从是为了”有备无患“,在主redis挂了之后,可以立马切换到从redis上,可能只需要花几分钟的时间,但是仍然是需要人为操作。假设主redis晚上...

2019-06-16 17:09:34 423

原创 redis主从配置

redis主从配置例如运行环境使用了一台redis,redis挂了怎么处理?如果等运维重启redis,并恢复好数据,可能需要花费很长时间。那么在这期间,我们的服务是不可用的,后果很可怕的。假设我们做了主从,主库挂了之后,运维让从库接管,那么服务可以继续运行,正所谓有备无患。当主服务器有数据时候,从服务器会自动备份到从服务器...

2019-06-16 16:03:05 305

原创 springbootWeb项目默认已经有RestFull功能

spring-boot-starter-web Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container 功能就是如下图http://localhost:8080/rest...

2019-06-15 16:35:12 330

原创 springboot事务EnableTransactionManagement

2019-06-15 16:12:34 1367

原创 springMVC的controller 控制层里面的注解

@Controller springmvc注解,处理http请求的@RestController 返回json格式的数据@RestController 相当于@contro ller+@ResponeBody@GetMapping 相当于@RequestMapping + Method=Get请求@PostMapping 相当于@RequestMapping +Meth...

2019-06-14 12:59:58 2261

原创 Spring Boot 配置详细配置文件

# ===================================================================# COMMON SPRING BOOT PROPERTIES## This sample file is provided as a guideline. Do NOT copy it in its# entirety to your own app...

2019-06-13 11:09:13 1282

原创 java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more tha

serverTimezone=CTT

2019-06-12 11:29:56 3550

原创 mybatis搭建完成后,测试druid数据源是否配置成功

2019-06-12 09:57:10 2032

原创 springboot使用默认的slf4j,和其他的冲突如何处理

druid使用的是log4j日志包,统一让druid使用springboot默认的日志包,直接将log4j替换为中间包替换前替换后执行后台就没有警告了原理是https://www.slf4j.org/legacy.html...

2019-06-12 09:46:47 1661

原创 springmvc中的DispatcherServlet视图记录

2017-10-12 01:06:31 213

谷歌验证码 谷歌验证码 apk

谷歌验证码,后台安全验证、

2020-01-06

ShareX-13.0.1-setup.exe

sharex截图软件,截全屏 分区截屏,

2019-12-17

android-json-rpc.jar

android-json-rpc,android中的jar包,可以下载使用。

2018-01-25

Redis Desktop Manager(桌面管理工具)下载

Redis Desktop Manager(桌面管理工具)下载

2016-07-26

firebug-2.0.14

firebug-2.0.14

2016-03-17

swing学习资源

swing学习资源,下拉框,jtable,上传下载

2015-08-27

广告浮动广告,对联广告,图片广告

广告浮动广告,对联广告,图片广告。图片广告可以多个

2015-01-17

apache-tomcat-7.0.22-windows-x86.zip

apache-tomcat-7.0.22-windows-x86.zip 86位

2012-03-03

apache-tomcat-7.0.22-windows-x64.zip

apache-tomcat-7.0.22-windows-x64.zip 64位

2012-03-03

空空如也

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

TA关注的人

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