前言
探究数据源动态切换原理, 并进行简单原理演练。
原理演练
- dao层基本实现
1 | public interface IDao { |
1 |
|
1 |
|
- dao管理
1 | public class DaoContextAdapter { |
1 | public class DaoContext { |
- service层动态切换dao
1 | public interface IService { |
1 | public class UserService implements IService{ |
- 演练
1 |
|
探究数据源动态切换原理, 并进行简单原理演练。
1 | public interface IDao { |
1 |
|
1 |
|
1 | public class DaoContextAdapter { |
1 | public class DaoContext { |
1 | public interface IService { |
1 | public class UserService implements IService{ |
1 |
|