[Spring] Problem z Thymeleaf i kontrolerem

0

Mam taki oto kod programu
Według programu na porcie localhost:8080, zły widok

zły

Prawidłowy widok, podglad html w przegladarce;
prawidłowy

chodzi głownie o to że pokazuje atrybut, a nie 'witamy w html'

git

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);
	}
}

1

Może się mylę, ale z tego co kojarze, powinno być @RequestMapping("/").

1 użytkowników online, w tym zalogowanych: 0, gości: 1