25

通过一个银行转账的案例,手写实现IOC 和 AOP-wx5d30212829a35的博客

 3 years ago
source link: https://blog.51cto.com/14455981/2500625
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
通过上一篇面试被问了几百遍的 IoC 和 AOP,还在傻傻搞不清楚?我们了解了 IOC 和 AOP 这两个思想,下面我们先不去考虑Spring是如何实现这两个思想的,先通过一个银行转账的案例,分析一下该案例在代码层面存在什么问题?分析之后使用我们已有的知识来解决这些问题(痛点)。其实这个过程就是在一步步分析并手动实现 IOC 和 AOP 。案例介绍银行转账:账户A向账户B转账(账户A减钱,账户B加

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK