I have implemented saml-adfs service provider using spring-security-saml2. SAML-ADFS authentication happens properly. After authentication I am trying to redirect it to a landing page, which has few variables such as UserID dynamically populating based on logged in user information. For html pages rendering, I am using spring-boot-started-thymeleaf lib. I have gone through various articles and done below configs. All my html files are present in src/main/resources/templates.
I am getting "Circular view path[landing],Check your ViewResolver setup! error.
If I change it to a static html page, which is present in src/main/resources/static folder, then it is loading the content.
Please guide me how I can resolve this issue. I have dependency of spring-boot-starter-web and spring-boot-starter-thymeleaf in my build.gradle
landing.html page
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<title>Landing!</title>
</head>
<body>
<h1>You are logged as <span th:text="${username}">null</span>!</h1>
<p>
<a th:href="@{/saml/logout}">Global Logout</a><br/>
<a th:href="@{/saml/logout?local=true}">Local Logout</a>
</p>
</body>
</html>
@Controller
public class LandingController {
@RequestMapping("/landing")`enter code here`
public String landing(@CurrentUser User user, Model model) {
model.addAttribute("username", user.getUsername());
return "landing";
}