![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
代码优化
叫我小练就行
爬啊爬
展开
-
servlet的优化
反射api语法 UserServlet使用反射优化代码 service方法使用反射优化处理不同的请求 //重写了service方法,就不走doGet或doPost方法了 @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //目标:实现一个servlet处理多个请求 //1.获取原创 2020-10-10 21:52:14 · 398 阅读 · 0 评论 -
sqlSession的优化
JDK动态代理优化SqlSession资源开启与关闭 目标 使用jdk动态代理增强每一个dao数据库方法初始化资源和关闭资源 优化需求 对于每个业务层方法都需要如下操作 package com.itheima.service; import com.itheima.dao.UserDao; import com.itheima.entity.User; import com.itheima.util.MybatisUtils; import org.apache.ibatis.session.SqlSes原创 2020-10-10 21:55:52 · 241 阅读 · 0 评论