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

猜你喜欢

转载自www.cnblogs.com/www1842564021/p/12808124.html