解决:将spring-context.gradle文件的下面这一行 optional(project(":spring-instrument")) 修改为 api(project(":spring-instrument"))