问题:FreeMarkerConfigurer 和 视图解析器FreeMarkerViewResolver都创建了,也对应的webapp目录,但是url访问了之后,页面没有跳转,只是页面显示了字符串
解决方法:
Controller层,不能使用@RestController,因为@RestController 相当于@ResponseBody + @Controller,返回的数据是一个json,你会得到一个写着“hello”的页面
问题:FreeMarkerConfigurer 和 视图解析器FreeMarkerViewResolver都创建了,也对应的webapp目录,但是url访问了之后,页面没有跳转,只是页面显示了字符串
解决方法:
Controller层,不能使用@RestController,因为@RestController 相当于@ResponseBody + @Controller,返回的数据是一个json,你会得到一个写着“hello”的页面