Springboot集成Mybatis-plus

​本文主要介绍如何在SpirngBoot最新版本2.71中集成mybatis-plus、配置自动代码生成器(自动生成Entity、Mapper、xml文件、Server、Controller)、以及集成分页插件pagehelper。1、引入maven依赖<dependency><groupId>com.baomidou</groupId><art...

如何在linux服务器上搭建Git服务

​本文主要讲解如何在自己的服务器上搭建Git服务。1、准备裸仓库​在开始架设Git服务器前,需要把现有仓库导出为裸仓库——即一个不包含当前工作目录的仓库。这通常是很简单的。为了通过克隆你的仓库来创建一个新的裸仓库,你需要在克隆命令后加上--bare选项。按照惯例,裸仓库的目录名以.git结尾,就像这样:$gitclone--baremy_projectmy_project.gitCloningin...

如何在Linux操作系统CentOS上安装git

本文主要介绍git的安装命令,以及如何验证git是否安装成功。1、安装命令yuminstallgit执行界面如下:2、验证是否安装成功通过查看版本号验证git是否安装成功git--version

mysql使用select查询将整数int转换为字符串

1、使用cast进行类型转换SELECTCAST(123ASCHAR);2、使用concat进行转换SELECTCONCAT(123,'');

Mybatis 返回resultType=“map“映射下划线转驼峰

Mybatis返回resultType=“map“映射下划线转驼峰示例<selectid="getMyList"parameterType="map"resultType="map">1、增加如下配置类:@ConfigurationpublicclassMybatisConfig{&#x...

Spring事件模型实现观察者模式

​本篇介绍如果通过Spring的事件模型来实现设计模型中的观察者模式。1、创建业务相关的Event事件/***@Author:knight*@Description:新用户注册事件*@Date:Createdin2021/9/816:05*/publicclassUserRegisterEventextendsApplicationEvent{pr...

docker安装elasticsearch

1、使用docker拉取elasticsearch镜像dockerpulldocker.elastic.co/elasticsearch/elasticsearch:7.13.32、启动容器dockernetworkcreateelasticdockerrun-d--namees--netelastic-p9200:9200-p9300:9300-e"ES_JAVA_...

springboot输出json格式日志

1、在pom文件中添加依赖<dependency><groupId>net.logstash.logback</groupId><artifactId>logstash-logback-encoder</artifactId><version>6.2</version><&#x2...

windows下filebeat启动命令

启动命令:filebeat.exe-e-cfilebeat.yml

JAVA如何将函数作为方法参数传入

1、创建函数接口类//函数接口类publicinterfaceIFunction{Map<String,Object>queryYearData(Map<String,Object>map);};2、方法调用时,使用lambda表达式传入函数参数publicCommonResult<List<Map<String,O...