首先是下载源码,根大多数教程一样,这里参考的
引入spring的包后参考慕课网spring课程写了段代码调试,又报各种错,这时处理参考文章
https://www.cnblogs.com/jssj/p/11631881.html
后来又报Error:(26, 38) java: 找不到符号 符号: 类 InstrumentationSavingAgent
解决方案是在gradle中添加配置compile(project(":spring-instrument"))
dependencies {
compile(project(":spring-context"))
compile(project(":spring-instrument"))
testCompile group: 'junit', name: 'junit', version: '4.12'
}
至此,终于完成了从spring容器获取实例的demo