@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";
}
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";
}
解决方案 »
- java.lang.NoClassDefFoundError: org/springframework/web/context/support/GenericW
- AOP???
- struts2.0 超链接 传值
- 求比较好用的web画图,图表等开源项目.
- 怎么使用wsdl4j解析wsdl文件?
- jsp页面到数据库乱码问题
- Struts+Hibernate 项目老是一段时间后出现Count not query ,还说数据库连接中断,求大神指点啊,急急急啊
- 重大苦脑,请求急救,在线等待,关心tomcat问题
- 晕死:jbuilder9,写了local的本地接口,如何测试啊?用remote的可以自动生成测试代码,而local的似乎不行!
- [JBoss][JNDI]得不到SessionBean
- Maven项目Efftive Pom里的一些自动配置的包的版本取决于什么
- json合并数据问题请教
public Base base;}
这个方法你的return 呢
这个不是方法,就是方便贴,把Java class类都放一块了
get set 也没有