自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

原创 HashSet、TreeSet、LinkedHashSet原理及线程安全的使用

一、原理 1、HashSet hashset底层其实维护的是一个hashMap实例。 /** * 维护的hashMap实例 */ private transient HashMap<E,Object> map; /** * 无参构造器,创建一个hashMap实例,默认的加载因子是0.75 */ public HashSet() { map = new H...

2021-09-05 00:50:59 3163

原创 基于JAVA8的HashMap底层原理,扩容机制

一、HashMap初始容量,扩容因子 /** * 默认容量 */ static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16 /** * 最大容量 */ static final int MAXIMUM_CAPACITY = 1 << 30; /** * 加载因子 */ static final float

2021-08-30 11:26:31 424

原创 ArrayList、Vector、LinkedList原理及扩容机制

我们了解其原理的最好方式就是看源码,下面我们就去看一下arrayList的源码:一、首先看一下我们看一下构造器. /** * 默认初始容量 */ private static final int DEFAULT_CAPACITY = 10; /** * 用于空实例的共享空数组实例. */ private static final Object[] EMPTY_ELEMENTDATA = {}; /** *

2021-08-25 16:34:14 509

原创 SpringBoot web开发注册servlet三大组件(Servlet、Filter、Listener)

1、注册Servlet,ServletRegistrationBean我们自己的Servletpublic class MyServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doPost(req, resp);

2021-03-16 23:15:58 117

原创 SpringBoot自动配置原理

自动配置原理:我们点击启动类上的@SpringBootApplication注解可以,其实@SpringBootApplication是一个复核注解:@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documented@Inherited@SpringBootConfiguration @EnableAutoConfiguration //开启自动配置功能@ComponentScan( e

2021-01-27 00:17:43 107

原创 SpringBoot配置文件的加载顺序

jar配置文件加载顺序:springboot 启动会扫描以下位置的application.properties/application.yml文件作为Springboot的默认配置文件:以下是优先级从高到低的顺序:file:./config/ file: ./ classpath: /config/ classpath: /note: 高优先级覆盖低优先级,四个位置的文件全部会加载,形成互补配置。另外我们还可以通过命令行参数spring.config.location来改变默认配置文件位

2021-01-26 23:15:07 190

原创 openresty安装

一、下载安装1、安装依赖$ yum install readline-devel pcre pcre-devel openssl openssl-devel gcc curl GeoIP-devel2、下载源码包https://github.com/openresty/openresty/releases选择最新安装包,下载解压$ tar -zxvf openresty-1.19.3.1rc1.tar.gz $ cd openresty-1.19.3.1rc1/confgu

2020-12-28 23:21:13 208

原创 nginx的echo模块安装

下载:$ /opt/software$ mkdir nginx-tools$ cd nginx-tools/$ wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz$ tar -zxvf v0.61.tar.gz引用:#先将下载的文件移动到对应的位置$ cd /usr/local/nginx/$ mkdir modules$ cd modules/$ cp -rf /opt/softw

2020-12-23 23:44:13 341

原创 NGINX 安装、启停、平滑升级、配置文件详解

NGINX安装、启停、平滑升级一、NGINX 安装1、下载nginx2、nginx解压安装3、预先安装4、nginx编译5、安装nginx6、查看安装路径7、启动nginx二、NGINX 命令1、nginx启动2、nginx启动3、nginx停止4、 重新打开日志5、nginx检查配置文件三、NGINX 的信号控制1、nginx停止第1种从容"优雅"停止第2种快速停止第3种强制停止2、重启nginx四、NGINX 平滑升级1、平滑升级下载高版本nginx执行信号平滑升级从容关闭旧进程优雅关闭2、中途停止升级

2020-12-20 17:58:06 523 1

原创 基于docker搭建Jenkins

一、基于Docker安装Jenkins1、安装dockerhttps://blog.csdn.net/hzhahsz/article/details/1104800992、使用docker安装jenkinsdocker run -p 8080:8080 -p 50000:50000 -v jenkins_data:/var/jenkins_home jenkinsci/blueocean3、访问Jenkins的端口未8080http://localhost:80804、关闭防火

2020-12-09 00:01:59 213

原创 CentOS7安装docker并配置转发网络

原文:https://blog.csdn.net/li1325169021/article/details/90780627

2020-12-02 14:10:06 738

转载 centos7 虚拟机改静态ip

原文:https://www.cnblogs.com/rgever/p/10216068.html

2020-12-02 13:38:57 58

转载 VMware安装Centos7、克隆虚拟机和设置固定IP

原文 :https://blog.csdn.net/babyxue/article/details/80970526

2020-12-01 21:43:18 88

原创 解决The valid characters are defined in RFC 7230 and RF,接口路径访问400

原文链接:https://blog.csdn.net/qq_32365919/article/details/82055800

2020-03-03 18:50:28 226

原创 Spring利用spring.handlers解析自定义配置

参考下文:https://www.jianshu.com/p/91f6068adff2

2019-08-30 13:54:21 225

原创 java类初始化顺序,子父类中代码执行的顺序

下面我们直接上例题:父类HelloApublic class HelloA{ public HelloA(){ System.out.println("A Class Constructor"); } { System.out.println("A Class code body"); } static { ...

2019-06-30 22:57:18 217

原创 Linux系统中Nginx实现前后端分离

一、linux安装nginx安装nginx 1 yum install -y openssl openssl-devel 2 yum install gcc-c++ 3 yum install -y pcre pcre-devel 4 yum install -y zlib zlib-devel 5 cd /usr/local/ 6 ...

2019-06-30 22:11:28 1371

原创 IDEA中Git的基本使用

一、IDEA中push,pull1、在idea中点击如下:2、弹出如下的框,并在URL中填入要pull的代码的git地址,Directory是在本地的文件名称、路径,填写完,点击Test可以测试。点击clone3、pull代码,要下拉的项目,鼠标右键note:fetch可以查看现在已有分支4、commit and push 要提交的代码,鼠标右键,如下点击进入勾选要...

2019-06-30 19:09:57 312

原创 Unsupported major.minor version 52.0 Linux下项目要求jdk与全局环境jdk不匹配 动态jdk启动项目

1、本人因为要在设置好全局jdk为1.7的linux服务器上启动一个用springboot2.0(要求jdk1.8及以上)的jar包项目,出现了下面的异常:Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher : Unsupport...

2019-05-16 16:45:25 416

原创 HTTPS协议的接口请求不通,抛javax.net.ssl.SSLHandshakeException sun.security.validator.Validator异常

在开发接口联调时发现https://协议的域名的接口在外面通过postman等接口工具可以调通,而且项目也可以访问通,但是放到服务器上之后就调不通了,该域名在服务器上也是可以ping通的,并且抛出如下的异常javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path buil...

2018-12-06 18:21:48 4082 1

转载 Spring Boot的启动器Starter详解

原blog链接:https://www.cnblogs.com/zhangjianbin/p/6349480.html spring Boot应用启动器基本的一共有44种,具体如下:1)spring-boot-starter 这是Spring Boot的核心启动器,包含了自动配置、日志和YAML。2)spring-boot-starter-actuator 帮助监控和管理应用。...

2018-11-12 10:40:27 91

原创 Spring Boot深入理解SpringApplication.run()方法启动

我们知道spring boot项目启动,只需要启动@SpringBootApplication.calss中的含有SpringApplication.run()方法的main方法就可以@SpringBootApplicationpublic class Application { public static void main(String[] args) { Sp...

2018-11-11 18:21:56 12456 1

原创 多层部门菜单树(Tree)

方法1:利用递归下面是Dto类public class DepartmentListDto { private String id; private String name; private String parentId; private String companyID; private List&lt;DepartmentListDto&g...

2018-08-27 11:07:38 691

原创 rest接口访问webService soap接口 用XStream javabean和xml的互转

创建javabean ,RequestCommonFPKJ@XStreamAlias("REQUEST_COMMON_FPKJ")public class RequestCommonFPKJ { @XStreamAsAttribute    //子元素作为标签属性出现 @XStreamAlias("class")    //标签别名 private String cla...

2018-06-22 15:20:12 2111 1

转载 AOP

Pointcut表示式(expression)和签名(signature)//Pointcut表示式@Pointcut("execution(* com.savage.aop.MessageSender.*(..))")//Point签名private void log(){} 由下列方式来定义或者通过 &amp;&amp;、 ||、 !、 的方式进行组合:args()@args()executi...

2018-06-13 11:41:41 283

空空如也

空空如也

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

TA关注的人

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