| | |
| | | package com.dy.pipIrrDemo.config; |
| | | |
| | | import com.dy.common.webListener.ConfigListener; |
| | | import com.dy.common.webListener.GenerateIdSetSuffixListener; |
| | | import jakarta.servlet.ServletContextListener; |
| | | import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; |
| | |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | @SuppressWarnings("unchecked")//不加编辑时警告:“使用了未经检查或不安全的操作。” |
| | | //@SuppressWarnings("unchecked")//不加编辑时警告:“使用了未经检查或不安全的操作。” |
| | | public class WebListenerConfiguration { |
| | | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | private static final int order_config = 1 ; |
| | | //private static final int order_config = 1 ; |
| | | private static final int order_idSetSuffix = 2 ; |
| | | |
| | | // @Bean |
| | |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> reqSsoListener() { |
| | | ServletListenerRegistrationBean<GenerateIdSetSuffixListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | GenerateIdSetSuffixListener listener = new GenerateIdSetSuffixListener(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setListener(new GenerateIdSetSuffixListener()); |
| | | listenerRegistrationBean.setOrder(order_idSetSuffix); |
| | | return listenerRegistrationBean; |
| | | } |