随笔分类 -  springMVC

摘要:1.执行流程 阅读全文
posted @ 2022-10-24 15:50 写代码的小哥哥 阅读(14) 评论(0) 推荐(0) 编辑
摘要:1.webinit package com.cj.config; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.filter.CharacterEncoding 阅读全文
posted @ 2022-10-24 15:49 写代码的小哥哥 阅读(181) 评论(0) 推荐(0) 编辑
摘要:1.拦截器作用 拦截控制方法的执行 2.实现 package com.cj.rest.interceptors; import org.springframework.stereotype.Component; import org.springframework.web.servlet.Handl 阅读全文
posted @ 2022-10-24 11:33 写代码的小哥哥 阅读(48) 评论(0) 推荐(0) 编辑
摘要:1.文件结构 2.删除数据 controller层 @RequestMapping(value = "/empoylee/{id}",method = RequestMethod.DELETE) public String delete(@PathVariable("id") Integer id) 阅读全文
posted @ 2022-10-20 12:50 写代码的小哥哥 阅读(39) 评论(0) 推荐(0) 编辑
摘要:1.get @RequestMapping(value = "/user",method = RequestMethod.GET) public String user(){ System.out.println("查询所有用户信息"); return "success"; } @RequestMa 阅读全文
posted @ 2022-09-07 23:54 写代码的小哥哥 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1. internalResourceView 转发到另一个页面 @RequestMapping("/internal") public String internal(){ return "forward:/test/test1"; } 2 redirectView 视图重定向 @RequestM 阅读全文
posted @ 2022-09-07 23:41 写代码的小哥哥 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1. servletApi @GetMapping("testServletApi") public String testServletApi(HttpServletRequest request){ request.setAttribute("price","100"); return "suc 阅读全文
posted @ 2022-09-06 22:48 写代码的小哥哥 阅读(24) 评论(0) 推荐(0) 编辑
摘要:1.servlet @GetMapping("/params") public String test5(HttpServletRequest request){ String username = request.getParameter("username"); String password 阅读全文
posted @ 2022-09-04 23:43 写代码的小哥哥 阅读(79) 评论(0) 推荐(0) 编辑
摘要:1 加的地方 1.可以加在类上 用于模块 2.可以加在方法上 用于路径 package com.cj.mvc.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bi 阅读全文
posted @ 2022-08-25 23:05 写代码的小哥哥 阅读(26) 评论(0) 推荐(0) 编辑
摘要:操作步骤 1.new module 2.pom.xml文件 3.文件结构 4.添加web模块 4.修改路径 文件目录 1.配置流程 1.1 配置前端控制器,对浏览器请求统一处理 1.2 配置 springMVC的配置文件路径 1.3 启动改为服务器启动时 <?xml version="1.0" en 阅读全文
posted @ 2022-08-22 17:22 写代码的小哥哥 阅读(18) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示