Проблемы с добавлением весеннего веб-потока в приложение весенней загрузки и соединения (jsf + primefaces + jetty)
Я пытаюсь добавить webflow в приложение весенней загрузки, используя библиотеку joinfaces.
Я использую primefaces-spring-boot-starter и jetty-spring-boot-starter для настройки сервера Jetty.
Добавлены необходимые зависимости веб-потока для pom и настроены необходимые средства регистрации потоков, flowbuilderservices, flowexecutor и flowhandlermapping,...
Приложение запускается правильно, считывает определения потоков из xmls, и, если входить в поток через URL, состояния принятия решений выполняются правильно, считывает соответствующий файл.xhtml состояния представлений, вызывает методы управляемого компонента и все, по-видимому, работают хорошо.
Но... после завершения выполнения bean-методов, когда я надеюсь, что html будет отображаться в браузере, приложение перенаправляется в корневую папку приложения без каких-либо ошибок в журнале.
У меня такое поведение со всеми потоками приложения. Методы bean-компонентов выполняются правильно, и когда я надеюсь увидеть html... перенаправленный в root.
Кто-нибудь пытался успешно добавить webflow в jsf-приложение joinfaces? Мне не хватает переопределить некоторые настройки по умолчанию для joinfaces?
Благодарю.
public class MvcConfiguration implements WebMvcConfigurer {
@Autowired
private WebFlowConfiguration webFlowConfiguration;
@Bean
public FlowHandlerMapping flowHandlerMapping() {
FlowHandlerMapping handlerMapping = new FlowHandlerMapping();
handlerMapping.setOrder(-1);
handlerMapping.setFlowRegistry(this.webFlowConfiguration.flowRegistry());
return handlerMapping;
}
@Bean
public FlowHandlerAdapter flowHandlerAdapter() {
JsfFlowHandlerAdapter adapter = new JsfFlowHandlerAdapter();
adapter.setFlowExecutor(this.webFlowConfiguration.flowExecutor());
return adapter;
}
@Bean
public ViewResolver faceletsViewResolver() {
UrlBasedViewResolver resolver = new UrlBasedViewResolver();
resolver.setViewClass(JsfView.class);
resolver.setPrefix("/");
resolver.setSuffix(".xhtml");
return resolver;
}
}
@Configuration
public class WebFlowConfiguration extends AbstractFacesFlowConfiguration {
@Bean
public FlowDefinitionRegistry flowRegistry() {
return getFlowDefinitionRegistryBuilder()
.setBasePath("classpath*:/META-INF/resources/flows")
.addFlowLocationPattern("/**/*.xml")
.setFlowBuilderServices(flowBuilderServices())
.build();
}
@Bean
public FlowBuilderServices flowBuilderServices() {
return getFlowBuilderServicesBuilder()
.setDevelopmentMode(true)
.setViewFactoryCreator(new JsfViewFactoryCreator())
.build();
}
@Bean
public FlowExecutor flowExecutor() {
return getFlowExecutorBuilder(flowRegistry())
.addFlowExecutionListener(new FlowFacesContextLifecycleListener())
.addFlowExecutionListener(new SecurityFlowExecutionListener())
.setMaxFlowExecutionSnapshots(0)
.build();
}
}