Já conferi o código mas continua danto erro:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Apr 20 13:39:02 BRT 2020
There was an unexpected error (type=Not Found, status=404).
No message available
package br.com.cursos.forum.controller;
import java.util.Arrays;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import br.com.cursos.forum.modelo.Curso;
import br.com.cursos.forum.modelo.Topico;
@Controller
@RequestMapping("/topicos")
public class TopicosController {
@ResponseBody
public List<Topico> lista(){
Topico topico = new Topico ("Duvida", "Duvida com Spring" , new Curso("Spring", "Programação"));
return Arrays.asList(topico, topico, topico);
}
}