為什么service中構(gòu)造器方法的sysout的內(nèi)容沒顯示?
public?class?TestDIServiceImpl?implements?TestDIService?{ private?TestDao?testDao; //constructor方法注入 public?TestDIServiceImpl(TestDao?testDao){ super(); this.testDao?=?testDao; } @Override public?void?sayHello(String?arg)?{ System.out.println("service構(gòu)造方法注入sayHello"); arg?=?arg?+?":"?+?this.hashCode(); testDao.sayHello(arg); }}
結(jié)果只顯示arg的內(nèi)容了,不顯示System.out.println("service構(gòu)造方法注入sayHello");中的內(nèi)容
2019-08-17
什么原因呢? 我沒有看出來(lái)
2018-12-20
解決了。。。
也希望大家多動(dòng)腦筋,有些問題是可以自己解決的