I ran the spring-boot-sample-web-static project from here, made this alteration to the pom
org.springframework.boot&l
Static files should be served from resources, not from 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/