I'm new to Spring and I find it is really hard to get into it. I want to serve a static index.html but it doesn't work.
I used this tutorial but can't access index.html with:
http://localhost:8080/ or
http://localhost:8080/src/main/public/index.html
IndexHtmlController:
package de.phip1611.springboot_test_1;
import org.springframework.stereotype.Controller;
@Controller
public class IndexHtmlController {}
// due to https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot
// this should be enough..
Best Answer
Can you try the below:
index.html
tosrc/main/resources/static
folderserver.contextPath
to/
. (i.e.server.contextPath=/
)