上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页

2017年5月4日

springmvc 之 文件上传

摘要: 注意:servlet-mapping如果为 / 时,要拦截所要的请求。 请求路径不能和上传的目录一致 阅读全文

posted @ 2017-05-04 09:39 forever_2h 阅读(125) 评论(0) 推荐(0) 编辑

springmvc 之 url映射restful 及 ant

摘要: 1. 传统的url :http://localhost:8080/usersys/delete.do?id=001 Restful : http://localhost:8080/usersys/001/delete.do 2. Restful : 表征状态转移。 3. Restful 的好处: 更 阅读全文

posted @ 2017-05-04 09:28 forever_2h 阅读(262) 评论(0) 推荐(0) 编辑

2017年5月3日

springmvc 之 处理方法的返回值类型

摘要: 1. void: 并且没有使用servletapi进行跳转,那么默认会将请求名作为试图名进行跳转。 结果: void: 在参数中使用了servletapi,并且在方法中使用servletapi进行了跳转。那么按照servletapi跳转的位置进行跳转。 结果: 使用servletAPI跳转页面,那么 阅读全文

posted @ 2017-05-03 16:14 forever_2h 阅读(3363) 评论(0) 推荐(0) 编辑

springmvc 之 数据处理

摘要: 1. 数据流入到处理类中 servletAPI可以自动注入到处理方法的属性上。 /** * ServletAPI可以通过方法的参数直接注入 * ServletAPI的包装类也可以直接注入 * @param req * @param wr * @return */ @RequestMapping("/ 阅读全文

posted @ 2017-05-03 15:29 forever_2h 阅读(270) 评论(0) 推荐(0) 编辑

springmvc 之 使用注解开发springmvc

摘要: 1. controller映射的几种方式: BeanNameUrlHandlerMapping <!-- 配置handlerMapping --> <bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMappi 阅读全文

posted @ 2017-05-03 14:53 forever_2h 阅读(1782) 评论(0) 推荐(0) 编辑

springmvc 之 配置及流程

摘要: 发起请求 服务器接受 DispatcherServlet(前端控制器) 根据配置的HandlerMapping找到对应的处理器 获取适配器对象 调用处理器来进行处理 mv 试图解析器 响应 阅读全文

posted @ 2017-05-03 14:35 forever_2h 阅读(129) 评论(0) 推荐(0) 编辑

springmvc 之 springmvc简介,开发步骤

摘要: 新建web项目 导入jar包 commons-logging-1.1.1.jar spring-aop-4.1.6.RELEASE.jar spring-aspects-4.1.6.RELEASE.jar spring-beans-4.1.6.RELEASE.jar spring-context-4 阅读全文

posted @ 2017-05-03 11:12 forever_2h 阅读(169) 评论(0) 推荐(0) 编辑

2017年5月2日

mybatis 之 mybatis整合spring

摘要: a) 新建java项目 b) 导入jar包,特别需要注意导入mybatis 和 spring 的整合包 d) 编写vo: e) 编写dao接口 f) 编写mapper映射文件 g) 编写dao的实现类 h) 编写service接口及其实现类 i) 编写spring的配置文件 j) 测试 不需要使用m 阅读全文

posted @ 2017-05-02 16:35 forever_2h 阅读(200) 评论(0) 推荐(0) 编辑

mybatis 之 mybatis缓存

摘要: mybatis同样有一级缓存和二级缓存。 一级缓存指在session的范围中同样的statement的id只会查询一次。 @Test public void testFindById(){ List list = new ArrayList(); list.add(1); list.add(3); List users= ... 阅读全文

posted @ 2017-05-02 15:59 forever_2h 阅读(126) 评论(0) 推荐(0) 编辑

mybatis 之 mybatis的映射

摘要: Vo类: 映射文件: 测试: 阅读全文

posted @ 2017-05-02 15:48 forever_2h 阅读(223) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页

导航