Controller之间的跳转分为 转发和重定向
redict:浏览器地址不会变,视为一次请求
forward:浏览器地址会变,视为再次请求
需要跳转到其他Controller 方法中 只需要在return 字符串中 加上 redict:
@RequestMapping("/libraryCard/creatCard")
String creatLibraryCard(){
return "redirect:/librarycard";
}
标签: springboot controller
推荐阅读:
vue.js:634 [Vue warn]: Property or method "userName" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
SpringBoot 整合 webapp时 访问404的解决办法
状态码:415,发送HTTP请求返回415状态码的解决办法
Vue 打开页面时就加载方法,例如查询
SpringCloud怎么调用多个服务的信息
Spring整合Mybatis
SpringCloud 加入 thymleaf前端页面的方法
This may be the result of an unspecified view, due to default view name generation
Spring AOP的实现原理
在使用axios时,this已经不是本地的this了.
行动消除疑虑