|
@@ -0,0 +1,97 @@
|
|
1
|
+* 05-04
|
|
2
|
+ * Spring配置数据源
|
|
3
|
+ * 数据源连接池的作用
|
|
4
|
+ * Spring配置数据源
|
|
5
|
+ * Spring 容器加载properties配置文件
|
|
6
|
+ * Spring原始注解
|
|
7
|
+* 05-05
|
|
8
|
+ * AutoWired注解以及value注解的使用
|
|
9
|
+ * spring原始注解的使用 @Component @qualifier等
|
|
10
|
+* 05-06
|
|
11
|
+ * Spring 新注解
|
|
12
|
+ * 使用上面注解无法全部替代xml文件
|
|
13
|
+ * 非自定义的Bean配置
|
|
14
|
+ * 加载properties文件
|
|
15
|
+ * 组件的扫描
|
|
16
|
+ * 引入其他文件
|
|
17
|
+ * 新注解
|
|
18
|
+ * Configuration、ComponentScan、Bean、PropertySource、Import
|
|
19
|
+ * 将之前的 context xml文件替代,使用新注解的形式
|
|
20
|
+* 05-11
|
|
21
|
+ * Spring集成web环境
|
|
22
|
+ * servletContext、ContextLoadListener的使用
|
|
23
|
+ * 配置 ContextLoadListener 监听器
|
|
24
|
+ * 使用 WebApplicationContextUtils获取 应用上下文
|
|
25
|
+ * SpringMvc 概述简介
|
|
26
|
+* 05-12
|
|
27
|
+ * RequestMapping 注解
|
|
28
|
+ * 注解放在类上或者方法上
|
|
29
|
+ * 参数 value、method、params params={"user"}表示参数中必须传入 user字段
|
|
30
|
+ * SpringMVC XML配置
|
|
31
|
+ * 转发与重定向
|
|
32
|
+ ``` java
|
|
33
|
+ return "forward:success.jsp";
|
|
34
|
+ return "redirect:success.jsp";
|
|
35
|
+ ```
|
|
36
|
+ * SpringMVC数据响应方式
|
|
37
|
+ * 页面展示(转发,重定向)
|
|
38
|
+ * 回写数据(返回字符串或者 json对象)
|
|
39
|
+* 05-16
|
|
40
|
+ * SpringMVC获取请求数据,SpringMVC可以获取如下类型参数
|
|
41
|
+ * 基本数据类型、 pojo类型参数、数组类型参数、集合类型参数
|
|
42
|
+ * RequestBody RequestParam注解
|
|
43
|
+ * @RequestParam(name = "Name1",required = false,defaultValue="1")
|
|
44
|
+ * 获取Restful风格的参数
|
|
45
|
+ ```java
|
|
46
|
+ // http://localhost:8083/rest1/zxy/19
|
|
47
|
+ @RequestMapping("/rest1/{name}/{age}")
|
|
48
|
+ ```
|
|
49
|
+ * 自定义类型转换器(以时间转换器为例)
|
|
50
|
+ * 定义转换器需实现Converter接口
|
|
51
|
+ * 在配置文件中声明转换器
|
|
52
|
+ * 在<annotation-driver>中引用转换器
|
|
53
|
+ * 获取Servlet相关的API 常用的如下
|
|
54
|
+ * HttpServletRequest
|
|
55
|
+ * HttpServletResponse
|
|
56
|
+ * HttpSession
|
|
57
|
+ * 获取请求头
|
|
58
|
+ * @RequestHeader
|
|
59
|
+* 05-17
|
|
60
|
+ * 接收文件上传的请求以及处理
|
|
61
|
+* 05-19
|
|
62
|
+ * jdbcTemplate使用
|
|
63
|
+* 05-22
|
|
64
|
+ * jdbcTemplate产生模板对象实现
|
|
65
|
+ * jdbcTemplate常用操作
|
|
66
|
+ ``` java
|
|
67
|
+ // 更新操作 成功返回影响行数
|
|
68
|
+ int row = jdbcTemplate.update("insert into `wb_tbl_a`(company_id,status) values (?,?)", 100, 100);
|
|
69
|
+ // 查询多个
|
|
70
|
+ List<AEntity> query = jdbcTemplate.query("select * from wb_tbl_a",
|
|
71
|
+ new BeanPropertyRowMapper<AEntity>(AEntity.class));
|
|
72
|
+ // 查询单个
|
|
73
|
+ AEntity entity = jdbcTemplate.queryForObjet("select * from wb_tbl_a where id =?",
|
|
74
|
+ new BeanPropertyRowMapper<AEntity>(AEntity.class),"10");
|
|
75
|
+ ```
|
|
76
|
+* 05-23
|
|
77
|
+ * Spring 环境构建
|
|
78
|
+ * spring-test项目资源引入,
|
|
79
|
+* 05-24
|
|
80
|
+ * Interceptor(拦截器)与filter(过滤器)
|
|
81
|
+ * Interceptor 作用于 springMvc项目中
|
|
82
|
+ * filter 作用于 javaWeb中
|
|
83
|
+ * 一般使用拦截器能实现的功能,同样使用filter也能实现
|
|
84
|
+* 05-25
|
|
85
|
+ * 拦截器 preHandle、postHandle的使用
|
|
86
|
+ * 在spring_test 项目中添加 拦截器
|
|
87
|
+* 05-26
|
|
88
|
+ * 异常处理 HandlerExceptionResolver
|
|
89
|
+* 05-29
|
|
90
|
+ * 异常处理机制 MVC配置等
|
|
91
|
+ * AOP原理 底层实现
|
|
92
|
+ * AOP 动态代理技术
|
|
93
|
+ * JDK代理,基于接口的动态代理
|
|
94
|
+ * cglib:基于父类的动态代理
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|