thymeleaf直接从session中取值
session.setAttribute("LoginUser",user);
两种写法都可
[[${session.LoginUser.name}]]
实体类
public class User {
String name;
String password;
}

thymeleaf直接从session中取值
session.setAttribute("LoginUser",user);
两种写法都可
[[${session.LoginUser.name}]]
实体类
public class User {
String name;
String password;
}