上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 公共类 package com.feijian.utils; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import c 阅读全文
posted @ 2023-03-24 20:59 Rui2022 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1\JSON复习 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script type="text/javascript"> var user ={ name:"飞剑", ag 阅读全文
posted @ 2023-03-24 20:04 Rui2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 一、TOMCAT CONFIG文件配置: <Connector port="8080" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" URIEncoding="UTF-8"/> 二、springmvc自带过滤配置 <! 阅读全文
posted @ 2023-03-24 15:48 Rui2022 阅读(11) 评论(0) 推荐(0) 编辑
摘要: @Controller @RequestMapping("/user") public class UserController { @GetMapping("/t1") //一般都加上@ReuestParam,避免前端传递的参数名字和后端不一致 public String test1(@Reque 阅读全文
posted @ 2023-03-24 14:57 Rui2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 第一种:实现接口Controller定义控制器是比较老的办法 缺点:一个控制器只有一个方法,如果有多个方法需要定义多个controller,定义方式比较麻烦 第二种:使用注解 @Controller 视图可以被复用 几种常用的注解 @Component 组件 @Service service @Co 阅读全文
posted @ 2023-03-23 22:06 Rui2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 真实开发-注解开发 1、 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-in 阅读全文
posted @ 2023-03-22 22:02 Rui2022 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 图为SpringMVC的一个较完整的流程图,实线表示SpringMVC框架提供的技术,不需要开发者实现,虚线表示需要开发者实现。 简要分析执行流程 1\DispatcherServlet表示前置控制器,是整个SpringMVC的控制中心。用户发出请求,DispatcherServlet接收请求并拦截 阅读全文
posted @ 2023-03-22 20:59 Rui2022 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 参考网页:https://www.kuangstudy.com/bbs/1618521039124783105 第1步:注册web.xml,注册DispatcherServlet <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http: 阅读全文
posted @ 2023-03-21 20:51 Rui2022 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1、欢迎页设置 在web 文件夹下新建form.jsp : input 的类型是text,名字是:method。 一旦输入 add 或 delete 提交, 就会到HelloServlet进行跳转 <%-- Created by IntelliJ IDEA. User: Administrator 阅读全文
posted @ 2023-03-20 22:38 Rui2022 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 第1步:配置Maven,新建module, 并添加框架支持,变为web项目 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </de 阅读全文
posted @ 2023-03-20 20:35 Rui2022 阅读(9) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页