springboot整理

Posted 邢昊天

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springboot整理相关的知识,希望对你有一定的参考价值。

idea切换项目:

https://jingyan.baidu.com/article/624e7459008f4234e8ba5a97.html

 

Spring Boot2.0以上版本EmbeddedServletContainerCustomizer被WebServerFactoryCustomizer替代

 

在Spring Boot2.0以上配置嵌入式Servlet容器时EmbeddedServletContainerCustomizer类不存在,经网络查询发现被WebServerFactoryCustomizer替代

 

https://blog.csdn.net/Hard__ball/article/details/81281898?utm_source=blogxgwz4

 

注册三大组件之listener方法:

 @Bean
    public ServletListenerRegistrationBean<Mylistener> mylistener(){
        ServletListenerRegistrationBean<Mylistener> servletListenerRegistrationBean=new ServletListenerRegistrationBean<>();
        servletListenerRegistrationBean.setListener(new Mylistener());
        return  servletListenerRegistrationBean;
    }

idea快捷键

https://jingyan.baidu.com/article/ed15cb1b86dab21be3698184.html

 

以上是关于springboot整理的主要内容,如果未能解决你的问题,请参考以下文章