為什么service中構造器方法的sysout的內容沒顯示?
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構造方法注入sayHello"); arg?=?arg?+?":"?+?this.hashCode(); testDao.sayHello(arg); }}
結果只顯示arg的內容了,不顯示System.out.println("service構造方法注入sayHello");中的內容
2019-08-17
什么原因呢? 我沒有看出來
2018-12-20
解決了。。。
也希望大家多動腦筋,有些問題是可以自己解決的