diff --git a/spring-boot-modules/spring-boot-mvc/README.md b/spring-boot-modules/spring-boot-mvc/README.md index 2e67c42ede..41b98063a6 100644 --- a/spring-boot-modules/spring-boot-mvc/README.md +++ b/spring-boot-modules/spring-boot-mvc/README.md @@ -4,7 +4,6 @@ This module contains articles about Spring Web MVC in Spring Boot projects. ### Relevant Articles: -- [Guide to the Favicon in Spring Boot](https://www.baeldung.com/spring-boot-favicon) - [Custom Validation MessageSource in Spring Boot](https://www.baeldung.com/spring-custom-validation-message-source) - [Display RSS Feed with Spring MVC](https://www.baeldung.com/spring-mvc-rss-feed) - [A Controller, Service and DAO Example with Spring Boot and JSF](https://www.baeldung.com/jsf-spring-boot-controller-service-dao) diff --git a/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java deleted file mode 100644 index 9a1f47b5cb..0000000000 --- a/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.baeldung.springbootmvc.config; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; -import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; - -@Configuration -public class FaviconConfiguration { - @Bean - public SimpleUrlHandlerMapping myFaviconHandlerMapping() { - SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping(); - mapping.setOrder(Integer.MIN_VALUE); - mapping.setUrlMap(Collections.singletonMap("/favicon.ico", faviconRequestHandler())); - return mapping; - } - - @Bean - protected ResourceHttpRequestHandler faviconRequestHandler() { - ResourceHttpRequestHandler requestHandler = new ResourceHttpRequestHandler(); - ClassPathResource classPathResource = new ClassPathResource("com/baeldung/images"); - List locations = Arrays.asList(classPathResource); - requestHandler.setLocations(locations); - return requestHandler; - } - - // @Controller - static class FaviconController { - - @RequestMapping(value = "favicon.ico", method = RequestMethod.GET) - @ResponseBody - void favicon() { - } - } -} diff --git a/spring-boot-modules/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico deleted file mode 100644 index 64105ac11c..0000000000 Binary files a/spring-boot-modules/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico and /dev/null differ diff --git a/spring-boot-modules/spring-boot-mvc/src/main/resources/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/favicon.ico deleted file mode 100644 index 64105ac11c..0000000000 Binary files a/spring-boot-modules/spring-boot-mvc/src/main/resources/favicon.ico and /dev/null differ diff --git a/spring-boot-modules/spring-boot-mvc/src/main/resources/static/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/static/favicon.ico deleted file mode 100644 index 64105ac11c..0000000000 Binary files a/spring-boot-modules/spring-boot-mvc/src/main/resources/static/favicon.ico and /dev/null differ