例如:
class A {
A() {
loadResouse();
}
public / private void loadResouse() {
todoSth.
}
}
报错 beancreationexception ...... constructor threw exception nullpointException......
但是用init-method 就可以,,为什么?
例如:
class A {
A() {
loadResouse();
}
public / private void loadResouse() {
todoSth.
}
}
报错 beancreationexception ...... constructor threw exception nullpointException......
但是用init-method 就可以,,为什么?
错误信息已经告诉你了,空指针异常。在构造函数里调用哪里出错了。