如果使用的是spring3.X
當在xxxServiceImpl中加上@Service註解,並在空構造器中
System.out.println(this);
那麼這句會執行兩次
com.xxxServiceImpl@559309
com.xxxServiceImpl$EnhancerBySpringCGLIB$eff0996c@1651ab4
如果是spring4.x,則沒有此問題
如果使用的是spring3.X
當在xxxServiceImpl中加上@Service註解,並在空構造器中
System.out.println(this);
那麼這句會執行兩次
com.xxxServiceImpl@559309
com.xxxServiceImpl$EnhancerBySpringCGLIB$eff0996c@1651ab4
如果是spring4.x,則沒有此問題