Mam taki oto kod programu
Według programu na porcie localhost:8080, zły widok
Prawidłowy widok, podglad html w przegladarce;
chodzi głownie o to że pokazuje atrybut, a nie 'witamy w html'
package masterspringmvc.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HelloController {
@RequestMapping
public String hello(){
return "resultPage";
}
}
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="pl">
<meta charset="UTF-8"/>
<title>Witcccccccaj w ThymeLeaf!</title>
</head>
<body>
<span th:text="|Witaj w Thymeleaf!|">witaj w html</span>
</body>
</html>
package masterspringmvc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MasterSpringMvcApplication {
public static void main(String[] args) {
SpringApplication.run(MasterSpringMvcApplication.class, args);
}
}