@Service public class AccountServiceImpl extends Object implements AccountService
| 限定符和类型 | 字段和说明 |
|---|---|
private AccountMapper |
accountMapper |
private OtherService |
otherService |
| 构造器和说明 |
|---|
AccountServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
createAccount(Account account) |
private void |
doCreateAccount(Account account) |
List<Account> |
listAll() |
List<Account> |
listAllByDbType(String dbType)
测试使用请求参数切换数据源
|
@Autowired private AccountMapper accountMapper
@Autowired private OtherService otherService
@DynamicSource(value="#account.name") @DynamicTransactional public void createAccount(Account account)
createAccount 在接口中 AccountService@DynamicSource public List<Account> listAll()
listAll 在接口中 AccountService@DynamicSource(value="#dbType") public List<Account> listAllByDbType(String dbType)
AccountServicelistAllByDbType 在接口中 AccountServiceprivate void doCreateAccount(Account account)
Copyright © 2023. All rights reserved.