Spring boot convert web.xml listener

后端 未结 3 1943
慢半拍i
慢半拍i 2020-12-31 11:47

I\'m trying to convert my project to Spring Boot project (executable jar file with Jetty embedded). All works with a standard example but I want migrate my old web.xml to Sp

3条回答
  •  旧时难觅i
    2020-12-31 12:22

    Also Spring Boot will automatically register any @Bean extend of HttpServlet;

       @Bean
       public ServletRegistrationBean axisServletRegistrationBean() {
          ServletRegistrationBean registration = new ServletRegistrationBean(new AxisServlet(), "/services/*");
          registration.addUrlMappings("*.jws");
          return registration;
       }
    

提交回复
热议问题