- 博客(30)
- 收藏
- 关注
原创 6.SpringCloud学习(六)——Spring Cloud Bus 消息总线
1.简介1.1 概述Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be used to broadcast state changes (e.g. configuration changes) or other management instructions. AMQP and Kafka broker implementations are i
2020-08-23 12:50:03
318
原创 5.SpringCloud学习(五)——Spring Cloud Config 配置中心
1.简介1.1 概述Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a central place to manage external properties for applications across all environments. The con
2020-08-23 12:46:52
308
原创 4.SpringCloud学习(四)——Spring Cloud OpenFeign 服务调用
1.简介1.1 概述Feign is a declarative web service client. It makes writing web service clients easier. To use Feign create an interface and annotate it. It has pluggable annotation support including Feign annotations and JAX-RS annotations. Feign also suppor
2020-08-23 12:44:23
391
原创 3.SpringCloud学习(三)——Spring Cloud Hystrix 服务降级
1.简介1.1 概述In a distributed environment, inevitably some of the many service dependencies will fail. Hystrix is a library that helps you control the interactions between these distributed services by adding latency tolerance and fault tolerance logic. Hy
2020-08-23 12:41:42
249
原创 2.SpringCloud学习(二)——Spring Cloud Eureka 服务注册中心
1.简介1.1 概述Service Discovery is one of the key tenets of a microservice-based architecture. Trying to hand-configure each client or some form of convention can be difficult to do and can be brittle. Eureka is the Netflix Service Discovery Server and Clie
2020-08-16 21:22:25
355
原创 1.SpringCloud学习(一)——Spring Cloud Ribbon 实现负载均衡
1.简介1.1 概述Ribbon is a client-side load balancer that gives you a lot of control over the behavior of HTTP and TCP clients. Feign already uses Ribbon, so, if you use @FeignClient, this section also applies.A central concept in Ribbon is that of the name
2020-08-16 21:18:53
244
原创 17.SpringBoot学习(十七)——Spring Boot 自定义Starter
1.简介1.1 概述A typical Spring Boot starter contains code to auto-configure and customize the infrastructure of a given technology, let’s call that “acme”. To make it easily extensible, a number of configuration keys in a dedicated namespace can be exposed
2020-08-02 22:29:20
247
原创 16.SpringBoot学习(十六)——Spring Boot MessageConverter消息转换器
1.简介1.1 概述Spring MVC uses the HttpMessageConverter interface to convert HTTP requests and responses. Sensible defaults are included out of the box. For example, objects can be automatically converted to JSON (by using the Jackson library) or XML (by usi
2020-08-02 22:28:15
1742
原创 15.SpringBoot学习(十五)——Spring Boot WebFlux路由
1.简介1.1 概述In WebFlux.fn, an HTTP request is handled with a HandlerFunction: a function that takes ServerRequest and returns a delayed ServerResponse (i.e. Mono<ServerResponse>). Both the request and the response object have immutable contracts tha
2020-08-02 22:26:39
949
原创 14.SpringBoot学习(十四)——Spring Boot WebFlux初体验
1.简介1.1 概述Spring WebFlux is the new reactive web framework introduced in Spring Framework 5.0. Unlike Spring MVC, it does not require the Servlet API, is fully asynchronous and non-blocking, and implements the Reactive Streams specification through the
2020-08-02 22:25:23
378
原创 13.SpringBoot学习(十三)——JDBC之 Spring Boot Jpa多数据源
1.简介1.1 概述在实际项目中一般是一个数据源,但是在某些特殊场景可能需要多个数据源,这里以 spring boot jpa 为例演示一下多数据源的配置和使用。2.演示环境JDK 1.8.0_201Spring Boot 2.2.0.RELEASE构建工具(apache maven 3.6.3)开发工具(IntelliJ IDEA )3.演示代码3.1 代码说明配置两个数据源,分别是 masterDataSource 和 slaveDataSource,它们由两个配置类 Maste
2020-08-02 22:23:50
150
原创 12.SpringBoot学习(十二)——JDBC之 Spring Boot Mybatis
1.简介1.1 概述The MyBatis-Spring-Boot-Starter help you build quickly MyBatis applications on top of the Spring Boot.By using this module you will achieve:Build standalone applicationsReduce the boilerplate to almost zeroLess XML configurationMyBatis
2020-07-26 22:16:30
204
原创 11.SpringBoot学习(十一)——JDBC之 Spring Boot JdbcTemplate
1.简介1.1 概述This is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract results. This class executes SQL queries or
2020-07-26 22:14:48
238
原创 10.SpringBoot学习(十)——JDBC之 Spring Boot Jpa
1.简介1.1 概述The Java Persistence API is a standard technology that lets you “map” objects to relational databases. The spring-boot-starter-data-jpa POM provides a quick way to get started. It provides the following key dependencies:Hibernate: One of the
2020-07-26 22:12:30
331
原创 9.SpringBoot学习(九)——Spring Boot Admin使用
1.简介1.1 概述Spring Boot Admin is a community project to manage and monitor your Spring Boot ® applications. The applications register with our Spring Boot Admin Client (via HTTP) or are discovered using Spring Cloud ® (e.g. Eureka, Consul). The UI is just
2020-07-26 22:10:22
1003
1
原创 8.SpringBoot学习(八)——Spring Boot Actuator监控
1.简介1.1 概述Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production. You can choose to manage and monitor your application by using HTTP endpoints or with JMX. Auditing, health, a
2020-07-20 22:32:14
708
原创 7.SpringBoot学习(七)——Spring Boot Email发送邮件
1.简介1.1 概述The Spring Framework provides an easy abstraction for sending email by using the JavaMailSender interface, and Spring Boot provides auto-configuration for it as well as a starter module.Spring Framework 通过使用 JavaMailSender 接口提供了用于发送电子邮件的简单抽象
2020-07-19 22:18:51
772
原创 6.Gradle多模块项目
假设有一个项目,它由3个模块组成:model、repository、web;三个模块之间的依赖关系是:web -> repository -> model1. Settingssettings文件声明了所需的配置来实例化项目的层次结构。在默认情况下,这个文件被命名为 settings.gradle,并且和根项目的build.gradle文件放在一起。1.1 settings文件下面的清单显示了 settings 文件的内容。若想使每个子项目都成为构建的一-部分,则可以调用带有项目路径参
2020-07-19 13:29:17
1350
原创 5.Gradle组件说明
1. 构建块每个 Gradle 构建都包含三个基本构建块:project、task 和 property。每个构建包含至少-一个 project,进而又包含一个或 多个 task。 project 和 task 暴露的属性可以用来控制构建。1.1 project在 Gradle 术语中,一个项目(project) 代表一个正在构建的组件(比如,一个 JAR文件),或一个想要完成的目标,如部署应用程序。如果你使用过 Maven, 那么这个概念应该听起来很熟悉。Gradle 的 build.gradle
2020-07-19 13:27:56
244
原创 4.Gradle构建Spring Boot项目
1. 创建项目需要已在本地安装好了 Gradle,并配置环境变量1.1 新建项目创建 spring boot 项目Type 选择 Gradle Project添加 web mvc 依赖finish 创建完成整个创建过程中,没法选择本地的 Gradle,所以要在项目创建完成后手动选择1.2 选择本地 Gradle进入项目后会开始联网下载 Gradle,这个是由 IDEA 里面的 Gradle 插件决定的。先停止下载,然后在 Settings -> Build, Execut
2020-07-19 13:25:01
203
原创 3.Gradle构建Java项目
1. Java开发Java插件是Gradle自身装载的一个插件。Java插件提供的基本功能远比源代码编译和打包多。它为你的项目建立了一个标准的项目布局,并确保有意义、有顺序地执行任务。现在,为你的项目创建一个构建脚本并使用Java插件。1.1 使用插件使用java插件apply plugin: 'java'1.2 定制项目可以修改项目和插件属性apply plugin: 'java'version = 0.1// 设置java版本编译兼容1.6sourceCompatibility
2020-07-19 13:22:18
129
原创 2.Gradle安装和常用命令
1. 安装前检查Gradle 依赖 JDK, 检查 JDK 是否已经安装 2. 安装 Gradle2.1 下载 Gradlehttps://gradle.org/releases/https://services.gradle.org/distributions/[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-NQc8Zqy1-1595135918423)(E:\笔记\自己整理\typora-user-images\image-20200715223051320.p
2020-07-19 13:21:31
688
原创 1.Gradle基础介绍
1. 项目自动化的好处防止手动介入创建可重复的构建让构建便携2. 项目自动化的类型按需构建:开发人员在自己的机器上触发构建触发构建:代码提交到版本控制系统时触发构建预定构建:通过定时任务进行构建3. 构建工具3.1 构建工具的组成构建文件+构建的输入输出+构建引擎+依赖管理器构建文件构建文件包含了构建所需的配置信息、定义外部依赖,例如第三方类库,还包含了以任务形式实现某个特殊目的的指令和它们的相互依赖关系。构建的输入输出一个任务会接收一个输入,然后执行一系列步骤,最后产
2020-07-19 13:18:16
161
原创 6.SpringBoot学习(六)——Spring Boot Banner自定义
1.简介1.1 概述The banner that is printed on start up can be changed by adding a banner.txt file to your classpath or by setting the spring.banner.location property to the location of such a file. If the file has an encoding other than UTF-8, you can set spr
2020-07-13 19:56:03
389
原创 5.SpringBoot学习(五)——Spring Boot Profile用法
1.简介1.1 概述Spring Profiles provide a way to segregate parts of your application configuration and make it be available only in certain environments. Any @Component, @Configuration or @ConfigurationProperties can be marked with @Profile to limit when it i
2020-07-12 22:41:44
741
原创 3.SpringBoot学习(三)——Spring Boot WebMVC及其工作原理
1.简介1.1 概述The Spring portfolio provides two parallel stacks. One is based on a Servlet API with Spring MVC and Spring Data constructs. The other is a fully reactive stack that takes advantage of Spring WebFlux and Spring Data’s reactive repositories. In
2020-07-12 18:46:09
1160
原创 2.SpringBoot学习(二)——Spring Boot ConfigurationProperties
1.简介1.1 概述Annotation for externalized configuration. Add this to a class definition or a @Bean method in a @Configuration class if you want to bind and validate some external Properties (e.g. from a .properties file).Binding is either performed by call
2020-07-11 22:23:25
405
原创 1.SpringBoot学习(一)——第一个Spring Boot Web应用
1.简介1.1 概述Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Sp
2020-07-10 22:32:50
285
原创 Arthas 使用(二) —— 应用场景
1. ognl获取beanSpringContextUtil,通常代码中会有类似这样的工具类用来获取 bean 实例@Componentpublic class SpringContextUtil implements ApplicationContextAware { private static ApplicationContext applicationContext; @Override public void setApplicationContext(Appli
2020-05-19 17:03:00
537
原创 Arthas 使用(一) —— 基础命令
Arthas 简介Arthas 是 Alibaba 开源的 Java 诊断工具,根据官方介绍,它提供了如下工功能:官方文档地址: https://alibaba.github.io/arthas/github 源码地址: https://github.com/alibaba/arthasArthas 安装启动 Arthas# 下载 arthascurl -O https://alibaba.github.io/arthas/arthas-boot.jar# 通过如下命令启动java -
2020-05-17 20:05:18
1283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人