首页
Gaoy's Blog
取消

Spring三级缓存决循环依赖

假设A和B的定义如下: public class A { private B b; public A(B b) { this.b = b; } } public class B { private A a; public B(A a) { this.a = a; } } 当Spring容器启动时,它会先创...

Java文档

线程池 线程池7个参数说明: corePoolSize(核心线程数):线程池中会维护一个最小的线程数量,即使这些线程处理空闲状态,他们也不会被销毁,除非设置了allowCoreThreadTimeOut。这里的最小线程数量即是corePoolSize。任务提交到线程池后,首先会检查当前线程数是否达到了corePoolSize,如果没有达到的话,则会创建一个新线程来处理这个...

ubuntu安装ngrok

安装go apt-get install golang 下载ngrok源码 git clone https://github.com/inconshreveable/ngrok.git 配置环境变量 sudo vim /etc/profile export GOPATH=/usr/local/go export PATH=$PATH:$GOPATH/bin export NGR...

mysql8.0开启远程访问权限

1.设置密码 ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'; 2.修改host update user set host='%' where user='root'; 3.刷新权限 flush privileges;

gem 添加国内源

查看当前使用的源地址 gem sources gem 删除默认源命令 gem sources --remove https://rubygems.org/ gem 添加国内源 gem sources -a https://gems.ruby-china.com/ ### gem sources --add https://mirrors.tuna.tsinghua.edu....

Centos7下yum安装mongodb

1.创建mongo repo源 vim /etc/yum.repos.d/mongodb.repo 2.把下面的内容复制到文件中 保存退出 [mongodb-org] name=MongoDB Repository baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/$releasever/mongodb-org/5.0/x86_...

查看linux服务器磁盘空间占用情况

1、查看磁盘空间占用 df -h 2、查看当前目录内文件夹的大小 du -h --max-depth=1 -h或–human-readable 以K,M,G为单位,提高信息的可读性。 –max-depth=目录层数 超过指定层数的目录后,予以忽略。

filebeat自定义索引规则

filebeat.yml配置 - type: log fields: source: base setup.ilm.enabled: false setup.template.overwrite: true setup.template.name: "filebeat" setup.template.pattern: "filebeat-*" setup.template.en...

spring boot项目自定义数据源,mybatisplus分页、逻辑删除无效解决方法

Spring Boot项目中数据源的配置可以通过两种方式实现: 1.application.yml或者application.properties配置 2.注入DataSource及SqlSessionFactory两个Bean 通过第二种方式配置数据源则按照MybatisPlus官方文档使用分页及逻辑删除插件会无效,解决思路是在初始化SqlSessionFactory将插件设置进去 ...

acme.sh 自动替换ssl证书

简介 acme.sh是github的开源项目,项目地址:https://github.com/acmesh-official/acme.sh 该项目实现了从letsencrypt生成免费的证书并且将证书替换到nginx、Apache等服务器 一、安装 1.命令安装 curl https://get.acme.sh | sh -s email=my@example.com 2.把 ...