根据网上教程 集成ureport 项目启动时报错。
原因:Ureport2 需要加载的配置文件,不需要单独写成配置文件再去加载,直接写到application.yml中
ureport:
disableHttpSessionReportCache: false
disableFileProvider: false
fileStoreDir: D:/ureportfiles
debug: true
启动类上再加上
@SpringBootApplication
@ImportResource("classpath:ureport-console-context.xml")
public class FlowReportApplication {
public static void main(String[] args) {
SpringApplication.run(FlowReportApplication.class, args);
}
@Bean
public ServletRegistrationBean<Servlet> ureportServlet(){
ServletRegistrationBean<Servlet> bean = new ServletRegistrationBean<Servlet>(new UReportServlet(), "/ureport/*");
return bean;
}
}