testReport.xx 为空 public String handle(@Autowired Report testReport)
@Controller
public class NullDebugController {
@GetMapping("/null")
public String handle(@Autowired Report testReport,@RequestParam String time,Model model) {
System.out.println("soso: "+ testReport);//object
System.out.println(testReport.base);//这个为啥是null 呢
return "view";
}
}
@Service("testReport")
class Report {
String demo = "report";
@Autowired
public Base base;
}
@Service
class Base {
String demo = "demo";
}