框架
Mybatis源码解读『DataSource和Connection』
本篇文章我们来介绍一下两个基础概念,DataSource和数据库连接Connection,从名称上看,DataSource表示数据源,Connection表示数据库连接,同时DataSource和Connection是JDBC的概念(jdk...

Mybatis源码解读『select查询——使用SqlSession』
上篇文章我们介绍了使用Mapper接口查询的实现原理,即Mybatis帮我们生成了代理对象,在代理逻辑中,最终使用SqlSession实现查询。除了使用Mapper接口查询之外,我们也可以直接使用Mybatis的SqlSession提供的方...

Mybatis源码解读『SQL映射文件解析』
上篇文章我们介绍了Mybatis如何将配置文件解析为Configuration对象,Mybatis中还有一个重要的SQL映射文件(mapper映射文件),用于配置sql相关信息,也需要被解析。在Mybatis配置文件中,通过”&...

Mybatis源码解读『配置文件解析』
上篇文章中,我们介绍了如何通过JDBC和Mybatis来连接并操作数据库。通过对Mybatis连接数据库的介绍,我们发现,Mybatis使用的核心是那份配置文件mybatis-config.xml,这是我们使用Mybatis的入口。本篇文章...

Mybatis源码解读『Java操作Mysql』
在工程开发中,大概率会使用到关系型数据库,一般在最常用的就是Mysql了。当在Java工程中使用Mysql时,我们需要获取与Mysql的连接,然后才能使用一些方法,操作Mysql。在使用Java操作Mysql的问题上,我们最开始学习时,一般...

Spring MVC源码解读『Spring MVC如何提供Rest接口』
上篇文章我们介绍了Spring MVC是如何响应前段Web请求的,文章中我们介绍了Controller和Jsp如何配合工作的(但其实文章大部分篇幅还是在介绍Controller,Jsp仅仅是在最后在DispatcherServlet中做了一...

Spring MVC源码解读『Spring MVC DispatcherServlet如何处理web请求』
上篇文章,我们介绍了Spring MVC的启动流程,介绍了一些Spring MVC的组件的启动过程。本篇文章我们就来看一下Spring MVC是如何通过这些组件来响应前端的请求的。 使用过Spring MVC开发过Java Web的同学应该...

Spring MVC源码解读『Spring MVC启动过程』
之前的两篇文章我们分别介绍了什么是MVC,通过Spring MVC实现了一个简单的demo,以及如何通过Idea构建并部署Spring MVC应用,相信我们都可以重新回顾起Spring MVC的相关细节。本篇文章我们就正式开始分析Sprin...

Spring MVC源码解读『Idea如何构建Spring MVC应用』
从工作几乎一直在使用开箱即用的Spring Boot,很少使用Spring MVC。在上篇文章介绍Spring MVC示例中搭建那个HelloWorld demo过程中,还费了一些周折。想着可能很多人的Java Web之旅都是从Spring...