com.netgrif.application.engine.configuration.FaviconConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
import java.util.Arrays;
import java.util.Collections;
@Configuration
public class FaviconConfiguration {
@Bean
public SimpleUrlHandlerMapping myFaviconHandlerMapping() {
SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
mapping.setOrder(Integer.MIN_VALUE);
mapping.setUrlMap(Collections.singletonMap("/favicon.ico", myFaviconRequestHandler()));
return mapping;
}
@Bean
protected ResourceHttpRequestHandler myFaviconRequestHandler() {
ResourceHttpRequestHandler requestHandler = new ResourceHttpRequestHandler();
requestHandler.setLocations(Arrays.asList(new ClassPathResource("/")));
return requestHandler;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy