摘要: 1、 AnnotationConfigApplicationContext功能 该类可以实现基于Java的配置类加载自定义在Spring的应用上下文的bean。 1.1 使用方式一:在构造方法中完成注册和刷新 AnnotationConfigApplicationContext ctx = new 阅读全文
posted @ 2019-12-20 16:24 Lamb_quan 阅读(5422) 评论(0) 推荐(0)
摘要: 1、SpringBoot配置自定义监听器 实质上是在servlet3.0+的容器中,注册一个Servlet。 功能:监听对应的请求路径url-api @Slf4j @Configuration public class SpringBootAutoConfigure { // 配置监听器 @Bean 阅读全文
posted @ 2019-12-20 09:18 Lamb_quan 阅读(2463) 评论(0) 推荐(0)