springframework 是spring 里面的一个基础开源框架,主要用于javaee的企业开发
Spring是什么呢?首先它是一个开源的项目,而且非常活跃
- 它是一个基于IOC和AOP的构架多层j2ee系统的框架,但它不强迫你必须在每一层中必须使用Spring,因为它模块化的很好,允许你根据自己的需要选择使用它的某一个模块
- 它实现了很优雅的MVC,对不同的数据访问技术提供了统一的接口,采用IOC使得可以很容易的实现bean的装配,提供了简洁的AOP并据此实现Transaction Management
springframework也存在反序列化的漏洞
JAVA环境
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
依赖版本
- spring-core 依赖版本:4.1.4.RELEASE
- spring-beans 依赖版本:4.1.4.RELEASE
- jdk 版本:1.7
检查依赖配置
确认项目中是否正确引入了
- spring-core
- spring-beans
的依赖。如果使用的是 Maven,可以在 pom.xml
文件中添加以下依赖:
<!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
资源下载
- maven spring-beans 4.1.4.RELEASE
- maven spring-core 4.1.4.RELEASE
- Java7 下载
- Spring框架 v4.1.4.RELEASE 源码
前置知识
MethodInvokeTypeProvider - kick-off
在 Spring 核心包中存在这样一个内部类:
org.springframework.core.SerializableTypeWrapper$MethodInvokeTypeProvider
static class MethodInvokeTypeProvider implements TypeProvider {
...
}
构造方法
这个类实现了 TypeProvider
接口,是一个可以被反序列化的类
public MethodInvokeTypeProvider(TypeProvider provider, Method method, int index) {
this.provider = provider;
this.methodName = method.get