How To Launch Index Html Using SpringBoot

Index Html In Spring Boot Is Failing To Launch .

Solution : Change your class by extending SpringBootServletInitializer that will load the index.html at any folder inside resources lets say resources/htmlFiles/index.html

package hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

class Application extends SpringBootServletInitializer{
 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  return application.sources(Application.class);

  public static void main(String[] args) {, args);


Popular posts from this blog

Angular cli ng command is not working

warning: LF will be replaced by CRLF in