SpringCloud学习-公共公共依赖

摘要: SpringCloud学习公共依赖 <!-- 子模块继承之后,提供作用:锁定版本+子modlue不用写groupId和version --> <dependencyManagement> <dependencies> <!--spring boot 2.2.2--> <dependency> <gr 阅读全文
posted @ 2022-02-25 18:04 Chase_Hanky 阅读(223) 评论(0) 推荐(0)

SpringBoot—Actuator

摘要: SpringBoot——Actuator 1.1 快速开始 未来每一个微服务在运算部署以后,我们都需要对其进行监控、追踪、审计和控制等等。Springboot就抽取了Actuator场景,使得我们每个微服务快速引用即可获得生产级别的应用监控、审计等功能。 那么,我们要怎么用呢? 首先,导入我们的场景 阅读全文
posted @ 2022-02-24 18:18 Chase_Hanky 阅读(275) 评论(0) 推荐(0)

SpringBoot监控项目(spring-boot-admin)

摘要: SpringBoot监控项目( spring-boot-admin) 创建admin监控服务器 第一步:创建一个新的springboot项目 第二步:修改pom.xml文件 <dependency> <groupId>de.codecentric</groupId> <artifactId>spri 阅读全文
posted @ 2022-02-24 17:45 Chase_Hanky 阅读(113) 评论(0) 推荐(0)

SproingBoot单元测试

摘要: SproingBoot单元测试 JUnit5简介 Spring Boot 2.2.0 版本开始引入 JUnit 5 作为单元测试默认库 JUnit 5官方文档 [https://junit.org/junit5/docs/current/user-guide/#writing-tests-annot 阅读全文
posted @ 2022-02-24 17:20 Chase_Hanky 阅读(82) 评论(0) 推荐(0)

SpringBoot自定义启动类 starter

摘要: SpringBoot自定义启动类 starter starter机制 SpringBoot中整合了很多的第三方依赖,使用起来只需要配置依赖和配置属性就可直接使用,非常方便。 我们在开发中可能会遇到一个模块多个场景重复使用的情况,这时就可以吧模块抽象出来,自定义成启动类,在配置文件中进行相关配置就可使 阅读全文
posted @ 2022-02-24 15:39 Chase_Hanky 阅读(955) 评论(0) 推荐(0)

Springboot切换配置文件

摘要: Springboot切换配置文件 运行方式切换 第一种方式(yml和properties) 1、编辑配置文件(三个,总配置,测试环境,开发环境) application.yml spring: profiles: active: dev application-dev.yml com: name: 阅读全文
posted @ 2022-02-23 10:17 Chase_Hanky 阅读(750) 评论(0) 推荐(0)

json表示格式

摘要: json表示格式 json格式化转化在线工具 [https://www.sojson.com/] 数组方式 [ ]、对象方式 { } 1、数组类型: int型数组: { "arr" : [1, 2, 3, 4] } string数组 { "arr" : ["a", "b", "c", "d"] } 阅读全文
posted @ 2022-02-23 09:46 Chase_Hanky 阅读(96) 评论(0) 推荐(0)

@RequestBody、@RequestParam和@PathVariable的区别

摘要: @RequestBody、@RequestParam和@PathVariable的区别 一、注解之间的区别 @RequsetParam是用于接收URL的查询串中的相应参数及请求体中的参数; @PathVariable 是用于接收URL中占位符的参数,@Requestmapper("/{id}") @ 阅读全文
posted @ 2022-02-21 16:58 Chase_Hanky 阅读(272) 评论(0) 推荐(1)

git常用命令

摘要: git常用命令 #初始化 git remote add origin "git地址" #配置远程git仓库版本 git init #初始化git仓库 git clone "git地址" #克隆仓库 #提交 git add . #跟踪所有变动的文件 git add <file> #跟踪指定文件 git 阅读全文
posted @ 2022-02-21 11:40 Chase_Hanky 阅读(25) 评论(0) 推荐(0)

Linux服务器,centos配置下载yum源仓库

摘要: Linux服务器,centos配置下载yum源仓库 yum的配置文件 yum 的配置文件在 /etc/yum.repos.d 目录下, 其中有多个配置文件,每一个配置文件中都可以配置一个或多个repository, 但是最终会被合并为一个交给系统,所以多个文件为了方便管理。 yum仓库配置 下面提供 阅读全文
posted @ 2022-01-18 22:00 Chase_Hanky 阅读(1407) 评论(0) 推荐(0)