SSM整合笔记-
摘要:spring 依赖注入 1导入坐标 2配置application文件 配置组件扫描(注解扫描 一般不扫描controller层) (配置mybatis整合) 配置aop 事物控制 3使用spring步骤 代理模式 加载application文件(在web.xml中配置监听器 自动装配)(整合myba
阅读全文
posted @
2022-01-25 17:18
ziwang520
阅读(45)
推荐(0) 编辑
spring aop切面切点
摘要:aop开发 1导入坐标 <!--导入spring的context坐标,context依赖aop--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <versio
阅读全文
posted @
2022-01-22 22:27
ziwang520
阅读(146)
推荐(0) 编辑
mvc 拦截器 类似javaweb中的过滤器
摘要:1 创建拦截器类实现HandlerInterceptor接口 package com.jc.interceptor;import org.springframework.web.servlet.HandlerInterceptor;import org.springframework.web.ser
阅读全文
posted @
2022-01-22 21:52
ziwang520
阅读(34)
推荐(0) 编辑
springmvc 请求数据 全局过滤器
摘要:@RequestMapping("/quick10")//mvc @ResponseBody//获取集合参数 2如果是用ajax来写的 把提交contextType设置为json格式就可以直接获取无需包装 public void save10(@RequestBody List<User> user
阅读全文
posted @
2022-01-17 21:39
ziwang520
阅读(230)
推荐(0) 编辑
spring mvc页面跳转和回写
摘要:mvc一般是在control层运用 页面跳转 跳转注解@RequestMapping(“/跳转名”) 1 可以在mvc配置文件中配置跳转页面路径的前后缀 以及重定向和转发的写法 2跳转返回对象可以是modeandview对象 modeandview中有很多方法 @RequestMapping("/q
阅读全文
posted @
2022-01-16 22:18
ziwang520
阅读(152)
推荐(0) 编辑
spring-mvc入门
摘要:1配置坐标 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.0.5.RELEASE</version> </dependency> 2配置spr
阅读全文
posted @
2022-01-13 22:30
ziwang520
阅读(29)
推荐(0) 编辑
Spring集成web
摘要:1导入坐标 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.0.5.RELEASE</version> </dependency> <depe
阅读全文
posted @
2022-01-13 16:43
ziwang520
阅读(38)
推荐(0) 编辑
spring集成junit
摘要:1 导入坐标 2使用@Runwith来替换原来的运行期 3使用@ContextConfiguration指定配置文件或者配置类 4注入需要测试的对象 5 测试 集成前 @Test public void test6() throws Exception{ ApplicationContext app
阅读全文
posted @
2022-01-13 15:39
ziwang520
阅读(33)
推荐(0) 编辑