Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
huayanYu committed Oct 23, 2023
1 parent 03c7cff commit 7994897
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.baomidou.dynamic.datasource.strategy.DynamicDataSourceStrategy;
import com.baomidou.dynamic.datasource.tx.DsTxEventListenerFactory;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,16 @@

@SpringBootTest(classes = DsTransactionalApplication.class, webEnvironment = RANDOM_PORT)
public class DsTransactionalTest {
@Autowired
DataSource dataSource;
@Autowired
DefaultDataSourceCreator dataSourceCreator;
@Autowired
private OrderService orderService;

@Autowired
private AccountService accountService;

@Autowired
private ProductService productService;

@Autowired
DataSource dataSource;

@Autowired
DefaultDataSourceCreator dataSourceCreator;
private DynamicRoutingDataSource ds;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,16 @@

@SpringBootTest(classes = DsTransactionalApplication.class, webEnvironment = RANDOM_PORT)
public class DsTransactionalTest {
@Autowired
DataSource dataSource;
@Autowired
DefaultDataSourceCreator dataSourceCreator;
@Autowired
private OrderService orderService;

@Autowired
private AccountService accountService;

@Autowired
private ProductService productService;

@Autowired
DataSource dataSource;

@Autowired
DefaultDataSourceCreator dataSourceCreator;
private DynamicRoutingDataSource ds;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ private void checkEnv() {
/**
* close db
*
* @param ds dsName
* @param dataSource db
* @param graceDestroy If true, close the connection after a delay.
* @param ds dsName
* @param dataSource db
* @param graceDestroy If true, close the connection after a delay.
*/
private void closeDataSource(String ds, DataSource dataSource, boolean graceDestroy) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

/**
* DsTxListenerMethodAdapter Referenced from org.springframework.transaction.event.TransactionalApplicationListenerMethodAdapter
*
*/
public class DsTxListenerMethodAdapter extends ApplicationListenerMethodAdapter {
private final DsTxEventListener dsTxEventListener;
Expand Down

0 comments on commit 7994897

Please sign in to comment.