springboot 使用Model存储数据,html文件获取不了数据

html获取不到Model里的数据

@Controller 类名:

img

方法:

img

html文件如下:

img

thymeleaf依赖:

img

你ModelAndView用错了吧
接口返回类型应该是ModelAndView对象。
将页面地址和参数值存放在model对象中,返回给页面。

要先运行控制器跳转到页面,不能直接访问页面。