V4.5 集成 Springboot 异常

 

@Configuration  
public class WebConfig {  
  
    /**  
 \* 统计报表servlet注册  
  *  
 */  @Bean  
 public ServletRegistrationBean<ReportServlet\> servletRegistrationBean() {  
        ServletRegistrationBean<ReportServlet\> registration = new ServletRegistrationBean<>(new ReportServlet());  
        registration.setLoadOnStartup(1);  
        registration.addInitParameter("configFile", "/WEB-INF/reportConfig.xml");  
        registration.addInitParameter("headless", "none");  
        registration.setName("reportServlet");  
        registration.addUrlMappings("/reportServlet");  
        ServletMappings.mappings.put("com.runqian.report4.view.ReportServlet", "/reportServlet");  
        System.out.println("润乾servlet注册完成");  
        return registration;  
    }  
  
  @Bean  
 public ServletRegistrationBean<DMServlet\> servletRegistrationBean1() {  
        ServletRegistrationBean<DMServlet\> reg = new ServletRegistrationBean<>(new DMServlet());  
        reg.setLoadOnStartup(2);  
        reg.addInitParameter("configFile", "/WEB-INF/dmConfig.xml");  
        reg.setName("DMServlet");  
        reg.addUrlMappings("/DMServlet","/DMServletAjax");  
        ServletMappings.mappings.put("com.raq.web.view.DMServlet", "/DMServlet");  
        return reg;  
    }

运行异常

org.jdom.JDOMException: Error in building

imagepng

Servlet.init()for servlet [DMServlet] threw exception

java.lang.NullPointerException: null

imagepng