1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| @Configuration @EnableConfigurationProperties(FlowableModelerAppProperties.class) @ComponentScan(basePackages = { //引入DatabaseConfiguration,所以排除扫描 // "org.flowable.ui.modeler.conf", "org.flowable.ui.modeler.repository", "org.flowable.ui.modeler.service", //flowable自己的安全验证,排除 // "org.flowable.ui.modeler.security", "org.flowable.ui.common.conf", "org.flowable.ui.common.filter", "org.flowable.ui.common.service", "org.flowable.ui.common.repository", //flowable自己的安全验证,排除 // "org.flowable.ui.common.security", "org.flowable.ui.common.tenant" } ) public class ApplicationConfiguration {
@Bean public ServletRegistrationBean modelerApiServlet(ApplicationContext applicationContext) { AnnotationConfigWebApplicationContext dispatcherServletConfiguration = new AnnotationConfigWebApplicationContext(); dispatcherServletConfiguration.setParent(applicationContext); dispatcherServletConfiguration.register(ApiDispatcherServletConfiguration.class); DispatcherServlet servlet = new DispatcherServlet(dispatcherServletConfiguration); ServletRegistrationBean registrationBean = new ServletRegistrationBean(servlet, "/api/*"); registrationBean.setName("Flowable Modeler App API Servlet"); registrationBean.setLoadOnStartup(1); registrationBean.setAsyncSupported(true); return registrationBean; }
}
|