摘要: 再也不用 getParamter 了 1. 建一个User类 package com.xinzhi.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; impor 阅读全文
posted @ 2021-01-25 22:49 Master_Sun 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 在 web.xml 中配置一个字符集过滤器即可 <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilt 阅读全文
posted @ 2021-01-25 22:00 Master_Sun 阅读(68) 评论(0) 推荐(0) 编辑
摘要: RequestMapping注解有六个属性 1、 value , method ; value: 指定请求的实际地址,指定的地址可以是URI Template 模式(后面将会说明); method: 指定请求的method类型, GET、POST、PUT、DELETE等; 2、 consumes , 阅读全文
posted @ 2021-01-25 21:56 Master_Sun 阅读(54) 评论(0) 推荐(0) 编辑
摘要: springmvc-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2 阅读全文
posted @ 2021-01-25 21:39 Master_Sun 阅读(52) 评论(0) 推荐(0) 编辑
摘要: package com.xinzhi.controller; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; import java 阅读全文
posted @ 2021-01-25 21:26 Master_Sun 阅读(91) 评论(0) 推荐(0) 编辑