随笔分类 - SpingMVC
摘要:https://www.cnblogs.com/zhihaospace/p/12342622.html 配置失败用空再试 一、maven <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/PO
阅读全文
摘要:json字符串 一、基础 1、序列化 对象->字符串 python dumps() js string** 2、反序列化 字符串->对象 python loads() js parse 二、jackson mvaen依赖 <dependency> <groupId>com.fasterxml.jac
阅读全文
摘要:一、正常乱码过滤器 web.xml <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <in
阅读全文
摘要:非resful格式 传递普通参数 @GetMapping("/t1") public String test(@RequestParam("name") String name, Model model){ System.out.println(name); model.addAttribute("
阅读全文
摘要:一、没有视图解析器的情况(忽略,不用) 视图解析器 <!-- 视图解析器 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResol
阅读全文
摘要:1、基本 @Controller 控制层 @Service 业务层 @Component 组件 @Repository dao 2、@RequestMapping url 三、restful 风格 与python的restful差不多 1、不用restful风格 访问链接 http://localh
阅读全文
摘要:1、添加jar包 <groupId>com.wt</groupId> <artifactId>springmvc</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>spr
阅读全文
摘要:<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> <dependency> <groupId>org.sp
阅读全文