![](https://img-blog.csdnimg.cn/20190918140213434.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
SpringBoot
SpringBoot
小柴林
When you learn about a framework, it’s important to know not only what it does but what principles it follows.
展开
-
Springboot集成Listener
由于springboot基于servlet3.0+,内嵌tomcat容器 因此无法像之前一样通过web.xml中配置Listener,本文基于springboot2.1.1第一种import javax.servlet.ServletContextEvent;import javax.servlet.ServletContextListener;import javax.servlet.annotation.WebListener;@WebListenerpublic class MyF原创 2020-10-29 23:40:47 · 378 阅读 · 1 评论 -
Springboot集成Filter
由于springboot基于servlet3.0+,内嵌tomcat容器 因此无法像之前一样通过web.xml中配置Filter,本文基于springboot2.1.1第一种@WebFilter(filterName = "myFilter",urlPatterns = "/*")public class MyFilter implements Filter { @Override public void init(FilterConfig filterConfig) th.原创 2020-10-27 10:50:23 · 446 阅读 · 0 评论 -
SpringBoot之spring.factories详述
简介Spring Boot中有一种非常解耦的扩展机制:Spring Factories。这种扩展机制实际上是仿照Java中的SPI扩展机制来实现的。什么是SPI机制SPI的全名为Service Provider Interface.大多数开发人员可能不熟悉,因为这个是针对厂商或者插件的。在java.util.ServiceLoader的文档里有比较详细的介绍。简单的总结下java SPI机制的思想。我们系统里抽象的各个模块,往往有很多不同的实现方案,比如日志模块的方案,xml解析模块、..转载 2020-06-04 00:03:46 · 897 阅读 · 0 评论 -
springboot读取logback-spring.xml
https://docs.spring.io/spring-boot/docs/1.3.8.RELEASE/reference/html/boot-features-logging.html原创 2020-04-04 13:56:51 · 1791 阅读 · 0 评论 -
SpringBoot注解集
@SpringBootApplication表示一个或多个类为配置类,并且触发自动配置和包扫描。由联合注解@Configuration、@EnableAutoConfiguration、@ComponentScan组成。原创 2020-05-04 10:51:20 · 194 阅读 · 0 评论