Static files should be served from resources, not from a controller.
Spring Boot will automatically add static web resources located within
any of the following directories:/META-INF/resources/ /resources/ /static/ /public/
refs:
https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot
https://spring.io/guides/gs/serving-web-content/