docs: 更新文档
This commit is contained in:
parent
bc0f54b637
commit
a44e5f4c5d
|
@ -7,7 +7,8 @@
|
|||
classes
|
||||
target
|
||||
logs
|
||||
.mtj.tmp/
|
||||
.mtj
|
||||
.tmp
|
||||
|
||||
# compiled files
|
||||
*.class
|
||||
|
@ -41,6 +42,7 @@ dist
|
|||
_book
|
||||
_jsdoc
|
||||
.temp
|
||||
.cache
|
||||
.deploy*/
|
||||
|
||||
# temp files
|
||||
|
|
|
@ -67,7 +67,12 @@
|
|||
|
||||
### Web
|
||||
|
||||
- [Spring WebMvc](docs/01.Java/13.框架/01.Spring/03.SpringWeb/01.SpringWebMvc.md)
|
||||
- [SpringWeb 综述](docs/01.Java/13.框架/01.Spring/03.SpringWeb/01.SpringWeb综述.md)
|
||||
- [SpringWeb 应用](docs/01.Java/13.框架/01.Spring/03.SpringWeb/02.SpringWeb应用.md)
|
||||
- [DispatcherServlet](docs/01.Java/13.框架/01.Spring/03.SpringWeb/03.DispatcherServlet.md)
|
||||
- [Spring 过滤器](docs/01.Java/13.框架/01.Spring/03.SpringWeb/04.Spring过滤器.md)
|
||||
- [Spring 跨域](docs/01.Java/13.框架/01.Spring/03.SpringWeb/05.Spring跨域.md)
|
||||
- [Spring 视图](docs/01.Java/13.框架/01.Spring/03.SpringWeb/06.Spring视图.md)
|
||||
- [SpringBoot 之应用 EasyUI](docs/01.Java/13.框架/01.Spring/03.SpringWeb/21.SpringBoot之应用EasyUI.md)
|
||||
|
||||
### IO
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Framework 综述
|
||||
date: 2019-11-22 10:46:02
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -15,22 +16,21 @@ permalink: /pages/9d3091/
|
|||
|
||||
# Spring Framework 综述
|
||||
|
||||
## 什么是 Spring 框架
|
||||
## Spring Framework 简介
|
||||
|
||||
Spring 是一个开源的 Java 框架,它的目标是简化企业级应用开发。
|
||||
Spring Framework 是最受欢迎的企业级 Java 应用程序开发框架。用于构建企业级应用的轻量级、一站式解决方案。
|
||||
|
||||
Spring 框架提供了很多功能,包括依赖注入、面向切面编程、数据访问、事务管理、Web 应用开发等。通过使用 Spring,开发者可以专注于业务逻辑的实现,而不需要关注一些底层的技术细节。
|
||||
当谈论到大小和透明度时, Spring 是轻量级的。 Spring 框架的基础版本是在 2 MB 左右的。
|
||||
|
||||
Spring 框架是一个轻量级的框架,它的核心容器非常小巧,只包含少量的类和接口,但它提供了很多可扩展的模块,可以根据需求灵活选择使用。Spring 框架采用松耦合的设计,可以和其他框架和库无缝集成,例如 Hibernate、MyBatis、Struts 等。
|
||||
Spring 框架的核心特性可以用于开发任何 Java 应用程序,但是在 Java EE 平台上构建 web 应用程序是需要扩展的。 Spring 框架的目标是使 J2EE 开发变得更容易使用,通过启用基于 POJO 编程模型来促进良好的编程实践。
|
||||
|
||||
Spring 的主要特性:
|
||||
Spring Framework 设计理念如下:
|
||||
|
||||
1. **轻量级和非侵入性**:Spring 框架的核心容器非常小巧,不会强制开发者遵循特定的编程模型。
|
||||
2. **依赖注入**:Spring 框架可以通过依赖注入的方式管理对象之间的依赖关系,减少了类之间的耦合。
|
||||
3. **面向切面编程**:Spring 框架提供了 AOP(面向切面编程)的支持,可以在不修改业务逻辑的情况下实现横切关注点的功能。
|
||||
4. **事务管理**:Spring 框架提供了事务管理的支持,可以统一管理多个数据源的事务。
|
||||
5. **Web 应用开发**:Spring 框架提供了 MVC(Model-View-Controller)的支持,可以方便地开发 Web 应用。
|
||||
6. **容易测试**:Spring 框架的松耦合设计和依赖注入的支持,可以方便地进行单元测试和集成测试。
|
||||
- 力争让选择无处不在
|
||||
- 体现海纳百川的精神
|
||||
- 保持后向兼容性
|
||||
- 专注 API 设计
|
||||
- 追求严苛的代码质量
|
||||
|
||||
## 为什么使用 Spring
|
||||
|
||||
|
@ -71,7 +71,22 @@ Spring 框架的 AOP 模块提供了面向方面的程序设计实现,允许
|
|||
|
||||
## Spring 体系结构
|
||||
|
||||
Spring 当前框架有**20**个 jar 包,大致可以分为**6**大模块。
|
||||
Spring 当前框架有**20**个 jar 包,大致可以分为**6**大模块:
|
||||
|
||||
- 1. 为什么使用 Spring
|
||||
- 2. 核心思想
|
||||
- 2.1. IoC
|
||||
- 2.2. Aop
|
||||
- 3. Spring 体系结构
|
||||
- 3.1. Core Container
|
||||
- 3.1.1. BeanFactory
|
||||
- 3.1.2. ApplicationContext
|
||||
- 3.2. AOP and Instrumentation
|
||||
- 3.3. Messaging
|
||||
- 3.4. Data Access / Integaration
|
||||
- 3.5. Web
|
||||
- 3.6. Test
|
||||
- 4. 术语
|
||||
|
||||
Spring 框架提供了非常丰富的功能,因此整个架构也很庞大。
|
||||
在我们实际的应用开发中,并不一定要使用所有的功能,而是可以根据需要选择合适的 Spring 模块。
|
||||
|
@ -170,4 +185,4 @@ Data Access/Integration 层包含了 JDBC / ORM / OXM / JMS 和 Transaction 模
|
|||
- **POJO**:POJO(Plain Old Java Objects)简单的 Java 对象,它可以包含业务逻辑或持久化逻辑,但不担当任何特殊角色且不继承或不实现任何其它 Java 框架的类或接口。
|
||||
- **容器**:在日常生活中容器就是一种盛放东西的器具,从程序设计角度看就是装对象的的对象,因为存在放入、拿出等操作,所以容器还要管理对象的生命周期。
|
||||
- **控制反转:**即 Inversion of Control,缩写为 IoC,控制反转还有一个名字叫做依赖注入(Dependency Injection),就是由容器控制程序之间的关系,而非传统实现中,由程序代码直接操控。
|
||||
- **JavaBean**:一般指容器管理对象,在 Spring 中指 Spring IoC 容器管理对象。
|
||||
- **JavaBean**:一般指容器管理对象,在 Spring 中指 Spring IoC 容器管理对象。
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 知识图谱
|
||||
date: 2020-08-12 07:01:26
|
||||
order: 21
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -108,8 +109,6 @@ public interface BeanPostProcessor {
|
|||
|
||||
为了理解这两个方法执行的时机,简单的了解下 bean 的整个生命周期:
|
||||
|
||||
![img](data:image/svg+xml;utf8,<?xml version="1.0"?><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="810" height="384"></svg>) _Bean 的实例化过程(来自:Spring 揭秘)_
|
||||
|
||||
`postProcessBeforeInitialization()`方法与`postProcessAfterInitialization()`分别对应图中前置处理和后置处理两个步骤将执行的方法。这两个方法中都传入了 bean 对象实例的引用,为扩展容器的对象实例化过程提供了很大便利,在这儿几乎可以对传入的实例执行任何操作。注解、AOP 等功能的实现均大量使用了`BeanPostProcessor`,比如有一个自定义注解,你完全可以实现 BeanPostProcessor 的接口,在其中判断 bean 对象的脑袋上是否有该注解,如果有,你可以对这个 bean 实例执行任何操作,想想是不是非常的简单?
|
||||
|
||||
再来看一个更常见的例子,在 Spring 中经常能够看到各种各样的 Aware 接口,其作用就是在对象实例化完成以后将 Aware 接口定义中规定的依赖注入到当前实例中。比如最常见的`ApplicationContextAware`接口,实现了这个接口的类都可以获取到一个 ApplicationContext 对象。当容器中每个对象的实例化过程走到 BeanPostProcessor 前置处理这一步时,容器会检测到之前注册到容器的 ApplicationContextAwareProcessor,然后就会调用其 postProcessBeforeInitialization()方法,检查并设置 Aware 相关依赖。看看代码吧,是不是很简单:
|
||||
|
@ -932,7 +931,7 @@ public void initialize(ConfigurableApplicationContext context) {
|
|||
}
|
||||
```
|
||||
|
||||
然后你就可以进入到`PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors()`方法了,这个方法除了会遍历上面的 3 个 BeanFactoryPostProcessor 处理外,还会获取类型为`BeanDefinitionRegistryPostProcessor`的 bean:`org.springframework.context.annotation.internalConfigurationAnnotationProcessor`,对应的 Class 为`ConfigurationClassPostProcessor`。`ConfigurationClassPostProcessor`用于解析处理各种注解,包括:@Configuration、@ComponentScan、@Import、@PropertySource、@ImportResource、@Bean。当处理`@import`注解的时候,就会调用<自动配置>这一小节中的`EnableAutoConfigurationImportSelector.selectImports()`来完成自动配置功能。其他的这里不再多讲,如果你有兴趣,可以查阅参考资料 6。
|
||||
然后你就可以进入到`PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors()`方法了,这个方法除了会遍历上面的 3 个 BeanFactoryPostProcessor 处理外,还会获取类型为`BeanDefinitionRegistryPostProcessor`的 bean:`org.springframework.context.annotation.internalConfigurationAnnotationProcessor`,对应的 Class 为`ConfigurationClassPostProcessor`。`ConfigurationClassPostProcessor`用于解析处理各种注解,包括:@Configuration、@ComponentScan、@Import、@PropertySource、@ImportResource、@Bean。当处理`@import`注解的时候,就会调用自动配置这一小节中的`EnableAutoConfigurationImportSelector.selectImports()`来完成自动配置功能。其他的这里不再多讲,如果你有兴趣,可以查阅参考资料 6。
|
||||
|
||||
⑧、查找当前 context 中是否注册有 CommandLineRunner 和 ApplicationRunner,如果有则遍历执行它们。
|
||||
|
||||
|
@ -949,4 +948,4 @@ public void initialize(ConfigurableApplicationContext context) {
|
|||
[3][craig walls 著;丁雪丰 译;spring boot 实战;中国工信出版集团 人民邮电出版社,2016](https://link.jianshu.com/?t=http%3A%2F%2Funion-click.jd.com%2Fjdc%3Fd%3DAQ6oHO)
|
||||
[4][深入探讨 java 类加载器](https://link.jianshu.com/?t=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcn%2Fjava%2Fj-lo-classloader%2F) : [www.ibm.com/developerwo…](https://link.jianshu.com/?t=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcn%2Fjava%2Fj-lo-classloader%2F)
|
||||
[5][spring boot 实战:自动配置原理分析](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49559951) : [blog.csdn.net/liaokailin/…](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49559951)
|
||||
[6][spring boot实战:spring boot bean加载源码分析](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49107209): [blog.csdn.net/liaokailin/…](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49107209)
|
||||
[6][spring boot实战:spring boot bean加载源码分析](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49107209): [blog.csdn.net/liaokailin/…](https://link.jianshu.com/?t=http%3A%2F%2Fblog.csdn.net%2Fliaokailin%2Farticle%2Fdetails%2F49107209)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 基本原理
|
||||
date: 2020-08-12 07:01:26
|
||||
order: 22
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -282,4 +283,4 @@ public abstract class SpringFactoriesLoader {
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [一文搞懂 springboot 启动原理](https://www.jianshu.com/p/943650ab7dfd)
|
||||
- [一文搞懂 springboot 启动原理](https://www.jianshu.com/p/943650ab7dfd)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 面试
|
||||
date: 2018-08-02 17:33:32
|
||||
order: 99
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -16,17 +17,6 @@ permalink: /pages/db33b0/
|
|||
|
||||
# Spring 面试
|
||||
|
||||
1. 什么是 Spring 框架?它的主要特点是什么?
|
||||
2. Spring 框架中的依赖注入是什么?如何实现依赖注入?
|
||||
3. Spring AOP 是什么?它的作用是什么?如何在 Spring 中使用 AOP?
|
||||
4. Spring 中的 Bean 是什么?如何定义一个 Bean?
|
||||
5. Spring MVC 是什么?如何在 Spring 中使用 MVC?
|
||||
6. Spring Boot 是什么?它和 Spring 框架有什么区别?
|
||||
7. Spring 中的事务管理是什么?如何在 Spring 中管理事务?
|
||||
8. Spring Security 是什么?它的主要功能是什么?
|
||||
9. Spring 中的集成测试是什么?如何在 Spring 中进行集成测试?
|
||||
10. 如何在 Spring 中实现 RESTful Web 服务?
|
||||
|
||||
## 综合篇
|
||||
|
||||
### 不同版本的 Spring Framework 有哪些主要功能?
|
||||
|
@ -594,7 +584,7 @@ DispatcherServlet 的工作流程可以用一幅图来说明:
|
|||
![img](https://raw.githubusercontent.com/dunwu/images/master/cs/java/spring/web/spring-dispatcher-servlet.png)
|
||||
|
||||
1. 向服务器发送 HTTP 请求,请求被前端控制器 `DispatcherServlet` 捕获。
|
||||
2. `DispatcherServlet` 根据 **<servlet-name>-servlet.xml** 中的配置对请求的 URL 进行解析,得到请求资源标识符(URI)。然后根据该 URI,调用 `HandlerMapping` 获得该 Handler 配置的所有相关的对象(包括 Handler 对象以及 Handler 对象对应的拦截器),最后以`HandlerExecutionChain` 对象的形式返回。
|
||||
2. `DispatcherServlet` 根据 **`<servlet-name>-servlet.xml`** 中的配置对请求的 URL 进行解析,得到请求资源标识符(URI)。然后根据该 URI,调用 `HandlerMapping` 获得该 Handler 配置的所有相关的对象(包括 Handler 对象以及 Handler 对象对应的拦截器),最后以`HandlerExecutionChain` 对象的形式返回。
|
||||
3. `DispatcherServlet` 根据获得的`Handler`,选择一个合适的 `HandlerAdapter`。(附注:如果成功获得`HandlerAdapter`后,此时将开始执行拦截器的 preHandler(...)方法)。
|
||||
4. 提取`Request`中的模型数据,填充`Handler`入参,开始执行`Handler`(`Controller`)。 在填充`Handler`的入参过程中,根据你的配置,Spring 将帮你做一些额外的工作:
|
||||
- HttpMessageConveter: 将请求消息(如 Json、xml 等数据)转换成一个对象,将对象转换为指定的响应信息。
|
||||
|
@ -619,4 +609,4 @@ WebApplicationContext 是 ApplicationContext 的扩展。它具有 Web 应用程
|
|||
## 资料
|
||||
|
||||
- [Top 50 Spring Interview Questions You Must Prepare In 2018](https://www.edureka.co/blog/interview-questions/spring-interview-questions/)
|
||||
- [Spring Interview Questions and Answers](https://www.journaldev.com/2696/spring-interview-questions-and-answers)
|
||||
- [Spring Interview Questions and Answers](https://www.journaldev.com/2696/spring-interview-questions-and-answers)
|
|
@ -13,6 +13,7 @@ tags:
|
|||
- SpringBoot
|
||||
permalink: /pages/9e0b67/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring 综述
|
||||
|
@ -39,4 +40,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Bean
|
||||
date: 2021-12-10 19:15:42
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -210,4 +211,4 @@ Spring Bean 垃圾回收步骤:
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Core Technologies](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring IoC
|
||||
date: 2020-08-30 16:06:10
|
||||
order: 02
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -917,4 +918,4 @@ Bean 默认是单例的,所以单例的 Controller 注入的 Service 也是一
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Core Technologies](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 依赖查找
|
||||
date: 2020-08-30 16:06:10
|
||||
order: 03
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -145,4 +146,4 @@ Bean 延迟依赖查找接口
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Core Technologies](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 依赖注入
|
||||
date: 2020-08-30 16:06:10
|
||||
order: 04
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -374,4 +375,4 @@ Aware 系列接口回调
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Core Technologies](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring IoC 依赖来源
|
||||
date: 2022-12-20 20:33:51
|
||||
order: 05
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Bean 作用域
|
||||
date: 2022-12-21 11:42:00
|
||||
order: 06
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Bean 生命周期
|
||||
date: 2022-12-21 19:26:01
|
||||
order: 07
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 配置元数据
|
||||
date: 2022-12-21 19:49:48
|
||||
order: 08
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 应用上下文生命周期
|
||||
date: 2022-12-23 09:58:09
|
||||
order: 09
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring AOP
|
||||
date: 2020-02-26 23:47:47
|
||||
order: 10
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -395,4 +396,4 @@ around advice 和前面的 before advice 差不多, 只是我们把注解 **@Bef
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [《 Spring 实战(第 4 版)》](https://item.jd.com/11899370.html)
|
||||
- [《 Spring 实战(第 4 版)》](https://item.jd.com/11899370.html)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 资源管理
|
||||
date: 2019-09-04 19:46:41
|
||||
order: 20
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -257,4 +258,4 @@ Spring 配置资源中有哪些常见类型?
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Core Technologies](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
||||
- [《小马哥讲 Spring 核心编程思想》](https://time.geekbang.org/course/intro/265)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 校验
|
||||
date: 2022-12-22 17:42:28
|
||||
order: 21
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 数据绑定
|
||||
date: 2022-12-22 19:26:57
|
||||
order: 22
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 类型转换
|
||||
date: 2022-12-22 19:43:59
|
||||
order: 23
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring EL 表达式
|
||||
date: 2023-01-12 20:26:46
|
||||
order: 24
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 事件
|
||||
date: 2022-12-22 20:31:02
|
||||
order: 25
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 国际化
|
||||
date: 2022-12-22 11:44:54
|
||||
order: 26
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 泛型处理
|
||||
date: 2022-12-22 20:11:52
|
||||
order: 27
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 注解
|
||||
date: 2022-12-23 09:08:15
|
||||
order: 28
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Environment 抽象
|
||||
date: 2022-12-23 09:27:44
|
||||
order: 29
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之快速入门
|
||||
date: 2021-12-10 18:22:26
|
||||
order: 31
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -383,4 +384,4 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 Getting Started](https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started.html#getting-started)
|
||||
- [Spring Boot 官方文档之 Getting Started](https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started.html#getting-started)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之属性加载详解
|
||||
date: 2019-01-10 11:55:54
|
||||
order: 32
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -383,4 +384,4 @@ public class AcmeProperties {
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 boot-features-external-config](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config)
|
||||
- [Spring Boot 官方文档之 boot-features-external-config](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之 Profile
|
||||
date: 2019-11-18 14:55:01
|
||||
order: 33
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -196,4 +197,4 @@ ctx.refresh();
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之 Bean Definition Profiles](https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-definition-profiles)
|
||||
- [Spring Boot 官方文档之 boot-features-profiles](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-profiles)
|
||||
- [Spring Boot 官方文档之 boot-features-profiles](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-profiles)
|
|
@ -13,6 +13,7 @@ tags:
|
|||
- SpringBoot
|
||||
permalink: /pages/5e7c20/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring 核心
|
||||
|
@ -58,4 +59,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 之数据源
|
||||
date: 2017-10-20 09:27:55
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 之 JDBC
|
||||
date: 2019-02-18 14:33:55
|
||||
order: 02
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 之事务
|
||||
date: 2022-09-22 07:46:49
|
||||
order: 03
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 之 JPA
|
||||
date: 2019-02-18 14:33:55
|
||||
order: 04
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -605,4 +606,4 @@ Spring Data 翻页查询总是返回 Page 对象,Page 对象提供了以下常
|
|||
|
||||
- [Spring 官网](https://spring.io/)
|
||||
- [Spring Framework 官方文档](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/index.html)
|
||||
- [Spring Boot 官方文档](https://docs.spring.io/spring-boot/docs/current/reference/html/data.html)
|
||||
- [Spring Boot 官方文档](https://docs.spring.io/spring-boot/docs/current/reference/html/data.html)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 集成 Mybatis
|
||||
date: 2019-05-09 17:09:25
|
||||
order: 10
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -248,4 +249,4 @@ Mapper 的基本原理是将实体类映射为数据库中的表和字段信息
|
|||
- [mybatis 源码中文注释](https://github.com/tuguangquan/mybatis)
|
||||
- [MyBatis Generator 详解](https://blog.csdn.net/isea533/article/details/42102297)
|
||||
- [Mybatis 常见面试题](https://juejin.im/post/5aa646cdf265da237e095da1)
|
||||
- [Mybatis 中强大的 resultMap](https://juejin.im/post/5cee8b61e51d455d88219ea4)
|
||||
- [Mybatis 中强大的 resultMap](https://juejin.im/post/5cee8b61e51d455d88219ea4)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring Data 综合
|
||||
date: 2023-02-08 09:10:35
|
||||
order: 20
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 访问 Redis
|
||||
date: 2023-01-31 20:54:42
|
||||
order: 21
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 访问 MongoDB
|
||||
date: 2018-12-15 17:29:36
|
||||
order: 22
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -182,4 +183,4 @@ Customer(id=63d6157b265e7c5e48077f64, firstName=Bob, lastName=Smith)
|
|||
- [Spring Data MongoDB 官方文档](https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/)
|
||||
- [Spring Data 官方示例](https://github.com/spring-projects/spring-data-examples/)
|
||||
- [Accessing Data with MongoDB](https://spring.io/guides/gs/accessing-data-mongodb/)
|
||||
- [Accessing MongoDB Data with REST](https://spring.io/guides/gs/accessing-mongodb-data-rest/)
|
||||
- [Accessing MongoDB Data with REST](https://spring.io/guides/gs/accessing-mongodb-data-rest/)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 访问 Elasticsearch
|
||||
date: 2018-12-25 14:06:36
|
||||
order: 23
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -129,4 +130,4 @@ Spring 和 Elasticsearch 匹配版本:
|
|||
- [Elasticsearch: The Definitive Guide](https://www.elastic.co/guide/en/elasticsearch/guide/master/index.html) - ElasticSearch 官方学习资料
|
||||
- [Spring Boot 官方文档之 boot-features-elasticsearch](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-elasticsearch)
|
||||
- [Spring Data Elasticsearch Github](https://github.com/spring-projects/spring-data-elasticsearch)
|
||||
- [Spring Data Elasticsearch 官方文档](https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/)
|
||||
- [Spring Data Elasticsearch 官方文档](https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/)
|
|
@ -14,6 +14,7 @@ tags:
|
|||
- 数据库
|
||||
permalink: /pages/b912d1/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring 数据篇
|
||||
|
@ -71,4 +72,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -86,6 +86,25 @@ Hello, World!
|
|||
Hello, dunwu!
|
||||
```
|
||||
|
||||
## SpringMVC 工作流程
|
||||
|
||||
Spring MVC 的工作流程可以用一幅图来说明:
|
||||
|
||||
![img](https://raw.githubusercontent.com/dunwu/images/master/cs/java/spring/web/spring-dispatcher-servlet.png)
|
||||
|
||||
1. 向服务器发送 HTTP 请求,请求被前端控制器 `DispatcherServlet` 捕获。
|
||||
2. `DispatcherServlet` 根据 **`<servlet-name>-servlet.xml`** 中的配置对请求的 URL 进行解析,得到请求资源标识符(URI)。然后根据该 URI,调用 `HandlerMapping` 获得该 Handler 配置的所有相关的对象(包括 Handler 对象以及 Handler 对象对应的拦截器),最后以`HandlerExecutionChain` 对象的形式返回。
|
||||
3. `DispatcherServlet` 根据获得的`Handler`,选择一个合适的 `HandlerAdapter`。(附注:如果成功获得`HandlerAdapter`后,此时将开始执行拦截器的 preHandler(...)方法)。
|
||||
4. 提取`Request`中的模型数据,填充`Handler`入参,开始执行`Handler`(`Controller`)。 在填充`Handler`的入参过程中,根据你的配置,Spring 将帮你做一些额外的工作:
|
||||
- HttpMessageConverter: 将请求消息(如 Json、xml 等数据)转换成一个对象,将对象转换为指定的响应信息。
|
||||
- 数据转换:对请求消息进行数据转换。如`String`转换成`Integer`、`Double`等。
|
||||
- 数据根式化:对请求消息进行数据格式化。 如将字符串转换成格式化数字或格式化日期等。
|
||||
- 数据验证: 验证数据的有效性(长度、格式等),验证结果存储到`BindingResult`或`Error`中。
|
||||
5. Handler(Controller)执行完成后,向 `DispatcherServlet` 返回一个 `ModelAndView` 对象;
|
||||
6. 根据返回的`ModelAndView`,选择一个适合的 `ViewResolver`(必须是已经注册到 Spring 容器中的`ViewResolver`)返回给`DispatcherServlet`。
|
||||
7. `ViewResolver` 结合`Model`和`View`,来渲染视图。
|
||||
8. 视图负责将渲染结果返回给客户端。
|
||||
|
||||
## 参考资料
|
||||
|
||||
- **官方**
|
||||
|
|
|
@ -186,7 +186,7 @@ FreeMarker 的附加便利宏简化了绑定和表单生成(包括验证错误
|
|||
|
||||
生成的 HTML 类似于以下示例:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
Name:
|
||||
<input type="text" name="name" value="">
|
||||
<br>
|
||||
|
@ -210,7 +210,7 @@ Name:
|
|||
|
||||
下一个例子是 FTL 中的单选按钮。表单支持对象为此字段指定默认值“伦敦”,因此无需验证。渲染表单时,整个可供选择的城市列表作为参考数据提供在模型中,名称为 `cityMap`。以下清单显示了示例:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
...
|
||||
Town:
|
||||
<@spring.formRadioButtons "command.address.town", cityMap, ""/><br><br>
|
||||
|
@ -218,7 +218,7 @@ Town:
|
|||
|
||||
前面的清单呈现一行单选按钮,一个用于 `cityMap` 中的每个值,并使用分隔符 `""`。没有提供额外的属性(缺少宏的最后一个参数)。 `cityMap` 对地图中的每个键值对使用相同的 `String`。地图的键是表单实际作为 POST 请求参数提交的内容。地图值是用户看到的标签。在前面的示例中,给定三个知名城市的列表和表单支持对象中的默认值,HTML 类似于以下内容:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
Town:
|
||||
<input type="radio" name="address.town" value="London">London</input>
|
||||
<input type="radio" name="address.town" value="Paris" checked="checked">Paris</input>
|
||||
|
@ -242,7 +242,7 @@ protected Map<String, ?> referenceData(HttpServletRequest request) throws Except
|
|||
|
||||
代码现在生成输出,其中无线电值是相关代码,但用户仍然看到更用户友好的城市名称,如下所示:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
Town:
|
||||
<input type="radio" name="address.town" value="LDN">London</input>
|
||||
<input type="radio" name="address.town" value="PRS" checked="checked">Paris</input>
|
||||
|
@ -255,7 +255,7 @@ Town:
|
|||
|
||||
要为您的标签切换到 XHTML 合规性,请为名为 `xhtmlCompliant` 的模型或上下文变量指定 `true` 值,如以下示例所示:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
<#-- for FreeMarker -->
|
||||
<#assign xhtmlCompliant = true>
|
||||
```
|
||||
|
@ -264,7 +264,7 @@ Town:
|
|||
|
||||
以类似的方式,您可以为每个字段指定 HTML 转义,如以下示例所示:
|
||||
|
||||
```jsp
|
||||
```html
|
||||
<#-- until this point, default HTML escaping is used -->
|
||||
|
||||
<#assign htmlEscape = true>
|
||||
|
@ -696,4 +696,4 @@ public class XsltController {
|
|||
## 参考资料
|
||||
|
||||
- [Spring Framework 官方文档](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/index.html)
|
||||
- [Spring Framework 官方文档之 Web](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html)
|
||||
- [Spring Framework 官方文档之 Web](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之应用 EasyUI
|
||||
date: 2019-01-08 17:19:34
|
||||
order: 21
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -505,4 +506,4 @@ java -jar target/
|
|||
## 引用和引申
|
||||
|
||||
- [EasyUI 官网](http://www.jeasyui.com/)
|
||||
- [EasyUI 中文网](http://www.jeasyui.cn/)
|
||||
- [EasyUI 中文网](http://www.jeasyui.cn/)
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Spring Web 篇
|
||||
title: Spring Web
|
||||
date: 2020-02-26 23:48:06
|
||||
categories:
|
||||
- Java
|
||||
|
@ -14,20 +14,21 @@ tags:
|
|||
- Web
|
||||
permalink: /pages/e2586a/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring Web 篇
|
||||
# Spring Web
|
||||
|
||||
> 章节主要针对:Spring 在 web 领域的应用。如:Spring MVC、WebSocket 等。
|
||||
|
||||
## 📖 内容
|
||||
|
||||
- [Spring Web 综述](01.SpringWeb综述.md)
|
||||
- [Spring Web 应用](02.SpringWeb应用.md)
|
||||
- [SpringWeb 综述](01.SpringWeb综述.md)
|
||||
- [SpringWeb 应用](02.SpringWeb应用.md)
|
||||
- [DispatcherServlet](03.DispatcherServlet.md)
|
||||
- [Sprng 过滤器](04.Spring过滤器.md)
|
||||
- [Spring 和跨域](05.Spring跨域.md)
|
||||
- [Spring 和视图](06.Spring视图.md)
|
||||
- [Spring 过滤器](04.Spring过滤器.md)
|
||||
- [Spring 跨域](05.Spring跨域.md)
|
||||
- [Spring 视图](06.Spring视图.md)
|
||||
- [SpringBoot 之应用 EasyUI](21.SpringBoot之应用EasyUI.md)
|
||||
|
||||
## 📚 资料
|
||||
|
@ -45,4 +46,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: spring-boot-async
|
||||
date: 2019-11-18 14:55:01
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -135,4 +136,4 @@ public class MyAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHa
|
|||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 boot-features-external-config](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config)
|
||||
- [Spring Boot 官方文档之 scheduling-annotation-support](https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#scheduling-annotation-support)
|
||||
- [Spring Boot 官方文档之 scheduling-annotation-support](https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#scheduling-annotation-support)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之集成 Json
|
||||
date: 2018-12-30 22:24:16
|
||||
order: 02
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -268,4 +269,4 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||
|
||||
**引用**
|
||||
|
||||
- [Spring Boot 官方文档之 boot-features-json](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-json)
|
||||
- [Spring Boot 官方文档之 boot-features-json](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-json)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之发送邮件
|
||||
date: 2019-11-20 15:20:44
|
||||
order: 03
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -274,4 +275,4 @@ public class MailService {
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 Sending Email](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#boot-features-email)
|
||||
- [Spring Boot 官方文档之 Sending Email](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#boot-features-email)
|
|
@ -14,6 +14,7 @@ tags:
|
|||
- IO
|
||||
permalink: /pages/56581b/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring IO
|
||||
|
@ -39,4 +40,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring集成缓存
|
||||
date: 2017-11-08 16:53:27
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -226,4 +227,4 @@ ehcache.xml 中的配置内容完全符合 Ehcache 的官方配置标准。
|
|||
## 参考资料
|
||||
|
||||
- [Spring 官方文档之缓存抽象](https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache)
|
||||
- [注释驱动的 Spring cache 缓存介绍](http://www.ibm.com/developerworks/cn/opensource/os-cn-spring-cache/)
|
||||
- [注释驱动的 Spring cache 缓存介绍](http://www.ibm.com/developerworks/cn/opensource/os-cn-spring-cache/)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring 集成调度器
|
||||
date: 2017-11-08 16:53:27
|
||||
order: 02
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -346,4 +347,4 @@ testCron 打印三次,时间间隔并非 5 秒或 6 秒,显然,cron 等待
|
|||
|
||||
## 参考
|
||||
|
||||
[Spring Framework 官方文档](http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/)
|
||||
[Spring Framework 官方文档](http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Spring集成Dubbo
|
||||
date: 2017-10-27 17:30:41
|
||||
order: 03
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -256,4 +257,4 @@ public class Consumer {
|
|||
|
||||
**ZooKeeper**
|
||||
|
||||
[官网](http://zookeeper.apache.org/) | [官方文档](http://zookeeper.apache.org/doc/trunk/)
|
||||
[官网](http://zookeeper.apache.org/) | [官方文档](http://zookeeper.apache.org/doc/trunk/)
|
|
@ -14,6 +14,7 @@ tags:
|
|||
- 集成
|
||||
permalink: /pages/d6025b/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring 集成
|
||||
|
@ -41,4 +42,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之安全快速入门
|
||||
date: 2021-05-13 18:21:56
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -42,4 +43,4 @@ spring.security.user.roles = USER
|
|||
|
||||
(3)启动应用后,访问任意路径,都会出现以下页面,提示你先执行登录操作。输入配置的用户名、密码(root/root)即可访问应用页面。
|
||||
|
||||
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/image-20191118150326556.png)
|
||||
![img](https://raw.githubusercontent.com/dunwu/images/master/snap/image-20191118150326556.png)
|
|
@ -1,13 +1,16 @@
|
|||
---
|
||||
title: Spring 4 升级踩雷指南
|
||||
date: 2017-12-15 15:10:32
|
||||
order: 01
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
- Spring
|
||||
- Spring其他
|
||||
tags:
|
||||
- null
|
||||
- Java
|
||||
- 框架
|
||||
- Spring
|
||||
permalink: /pages/752c6a/
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot 之 banner 定制
|
||||
date: 2018-12-21 23:22:44
|
||||
order: 21
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -127,4 +128,4 @@ spring:
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 Customizing the Banner](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-banner)
|
||||
- [Spring Boot 官方文档之 Customizing the Banner](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-banner)
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: SpringBoot Actuator 快速入门
|
||||
date: 2022-06-14 20:51:22
|
||||
order: 22
|
||||
categories:
|
||||
- Java
|
||||
- 框架
|
||||
|
@ -367,4 +368,4 @@ Spring Boot Actuator 支持简单的审计功能。如果应用中启用了 Spri
|
|||
|
||||
## 参考资料
|
||||
|
||||
- [Spring Boot 官方文档之 Production-ready Features](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator)
|
||||
- [Spring Boot 官方文档之 Production-ready Features](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator)
|
|
@ -13,6 +13,7 @@ tags:
|
|||
- SpringBoot
|
||||
permalink: /pages/6bb8c1/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# Spring 其他
|
||||
|
@ -38,4 +39,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [我的博客](https://github.com/dunwu/blog) ◾
|
|
@ -12,6 +12,7 @@ tags:
|
|||
- SpringBoot
|
||||
permalink: /pages/a1a3d3/
|
||||
hidden: true
|
||||
index: false
|
||||
---
|
||||
|
||||
# SPRING-TUTORIAL
|
||||
|
@ -52,6 +53,8 @@ hidden: true
|
|||
- [Spring 事件](01.Spring核心/25.Spring事件.md)
|
||||
- [Spring 国际化](01.Spring核心/26.Spring国际化.md)
|
||||
- [Spring 泛型处理](01.Spring核心/27.Spring泛型处理.md)
|
||||
- [Spring 注解](01.Spring核心/28.Spring注解.md)
|
||||
- [Spring Environment 抽象](01.Spring核心/29.SpringEnvironment抽象.md)
|
||||
- [SpringBoot 教程之快速入门](01.Spring核心/31.SpringBoot之快速入门.md)
|
||||
- [SpringBoot 之属性加载](01.Spring核心/32.SpringBoot之属性加载.md)
|
||||
- [SpringBoot 之 Profile](01.Spring核心/33.SpringBoot之Profile.md)
|
||||
|
@ -150,4 +153,4 @@ hidden: true
|
|||
|
||||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [钝悟的博客](https://dunwu.github.io/blog/) ◾
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾
|
|
@ -63,7 +63,12 @@ footer: CC-BY-SA-4.0 Licensed | Copyright © 2018-Now Dunwu
|
|||
|
||||
### Web
|
||||
|
||||
- [Spring WebMvc](01.Java/13.框架/01.Spring/03.SpringWeb/01.SpringWebMvc.md)
|
||||
- [SpringWeb 综述](01.Java/13.框架/01.Spring/03.SpringWeb/01.SpringWeb综述.md)
|
||||
- [SpringWeb 应用](01.Java/13.框架/01.Spring/03.SpringWeb/02.SpringWeb应用.md)
|
||||
- [DispatcherServlet](01.Java/13.框架/01.Spring/03.SpringWeb/03.DispatcherServlet.md)
|
||||
- [Spring 过滤器](01.Java/13.框架/01.Spring/03.SpringWeb/04.Spring过滤器.md)
|
||||
- [Spring 跨域](01.Java/13.框架/01.Spring/03.SpringWeb/05.Spring跨域.md)
|
||||
- [Spring 视图](01.Java/13.框架/01.Spring/03.SpringWeb/06.Spring视图.md)
|
||||
- [SpringBoot 之应用 EasyUI](01.Java/13.框架/01.Spring/03.SpringWeb/21.SpringBoot之应用EasyUI.md)
|
||||
|
||||
### IO
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# ------------------------------------------------------------------------------
|
||||
# gh-pages 部署脚本
|
||||
# @author Zhang Peng
|
||||
# @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
|
||||
# @since 2020/2/10
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue