使用redirect重定向url后可以用RedirectAttributes拿到消息并将消息展示到前端
通过attributes.addFlashAttribute方法
@PostMapping("/types")
public String posy(Type type, RedirectAttributes attributes){
Type type1 = typeService.saveType(type);
if
使用redirect重定向url后可以用RedirectAttributes拿到消息并将消息展示到前端
通过attributes.addFlashAttribute方法
@PostMapping("/types")
public String posy(Type type, RedirectAttributes attributes){
Type type1 = typeService.saveType(type);
if