Remove RichFaces checks

See gh-1794
This commit is contained in:
rstoyanchev
2023-03-27 14:39:31 +01:00
parent 2584aadef3
commit 43dc24af4f
2 changed files with 0 additions and 18 deletions

View File

@@ -23,7 +23,6 @@ import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.faces.webflow.JsfResourceRequestHandler;
import org.springframework.util.ClassUtils;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter;
import org.springframework.webflow.config.FlowDefinitionRegistryBuilder;
@@ -53,11 +52,6 @@ import org.springframework.webflow.executor.FlowExecutor;
*/
public class AbstractFacesFlowConfiguration implements ApplicationContextAware {
private static final boolean isRichFacesPresent =
ClassUtils.isPresent("org.richfaces.application.CoreConfiguration",
ResourcesBeanDefinitionParser.class.getClassLoader());
private ApplicationContext applicationContext;
@@ -108,9 +102,6 @@ public class AbstractFacesFlowConfiguration implements ApplicationContextAware {
Map<String, Object> urlMap = new HashMap<>();
urlMap.put("/jakarta.faces.resource/**", jsfResourceRequestHandler());
if (isRichFacesPresent) {
urlMap.put("/rfRes/**", jsfResourceRequestHandler());
}
SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
handlerMapping.setUrlMap(urlMap);

View File

@@ -25,7 +25,6 @@ import org.springframework.beans.factory.support.ManagedMap;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter;
@@ -41,10 +40,6 @@ public class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
private static final String SERVLET_RESOURCE_HANDLER_BEAN_NAME = "jsfResourceRequestHandler";
private static final boolean isRichFacesPresent =
ClassUtils.isPresent("org.richfaces.application.CoreConfiguration",
ResourcesBeanDefinitionParser.class.getClassLoader());
public BeanDefinition parse(Element element, ParserContext parserContext) {
Object source = parserContext.extractSource(element);
@@ -78,10 +73,6 @@ public class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
Map<String, String> urlMap = new ManagedMap<>();
urlMap.put("/jakarta.faces.resource/**", SERVLET_RESOURCE_HANDLER_BEAN_NAME);
if (isRichFacesPresent) {
urlMap.put("/rfRes/**", SERVLET_RESOURCE_HANDLER_BEAN_NAME);
}
RootBeanDefinition beanDefinition = new RootBeanDefinition(SimpleUrlHandlerMapping.class);
beanDefinition.setSource(source);
beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);