2
respostas

erro spring boot

ao carregar spring boot aparece o seguinte aviso " 2018-11-05 11:06:19.391 WARN 12240 --- [ main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)" e no navegador o seguinte erro "There was an unexpected error (type=Internal Server Error, status=500). Error resolving template "index", template might not exist or might not be accessible by any of the configured Template Resolvers"

2 respostas

Boa tarde Guilherme, pode me mostrar suas classes de configuração?

package br.com.alura.listavip;

import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping;

@Controller public class ConvidadoController {

@RequestMapping("/")
public String index(){
    return "index";
}

}

package br.com.alura.listavip;

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplicationpublic class Configuracao {

public static void main(String[] args) {
    SpringApplication.run(Configuracao.class, args);
}

}

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software