mirror of
https://gitee.com/dromara/hmily.git
synced 2024-12-04 20:28:20 +08:00
bug commit
This commit is contained in:
parent
bc5afb091f
commit
1845d8e87a
@ -30,6 +30,7 @@ import com.hmily.tcc.common.utils.RepositoryPathUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.util.List;
|
||||
@ -45,7 +46,8 @@ import java.util.stream.Collectors;
|
||||
@RequiredArgsConstructor
|
||||
public class JdbcCompensationServiceImpl implements CompensationService {
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
private String dbType;
|
||||
|
||||
|
@ -73,12 +73,9 @@ public class CompensationConfiguration {
|
||||
|
||||
private final Environment env;
|
||||
|
||||
private final JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Autowired
|
||||
JdbcRecoverConfiguration(final Environment env, final JdbcTemplate jdbcTemplate) {
|
||||
JdbcRecoverConfiguration(final Environment env) {
|
||||
this.env = env;
|
||||
this.jdbcTemplate = jdbcTemplate;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ -98,7 +95,7 @@ public class CompensationConfiguration {
|
||||
@Bean
|
||||
@Qualifier("jdbcTransactionRecoverService")
|
||||
public CompensationService jdbcTransactionRecoverService() {
|
||||
JdbcCompensationServiceImpl jdbcTransactionRecoverService = new JdbcCompensationServiceImpl(jdbcTemplate);
|
||||
JdbcCompensationServiceImpl jdbcTransactionRecoverService = new JdbcCompensationServiceImpl();
|
||||
jdbcTransactionRecoverService.setDbType(env.getProperty("compensation.db.driver"));
|
||||
return jdbcTransactionRecoverService;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
compensation:
|
||||
db:
|
||||
driver : com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.1.68:3306/tx?useUnicode=true&characterEncoding=utf8
|
||||
username: xiaoyu
|
||||
password: Wgj@555888
|
||||
url: jdbc:mysql://192.168.1.98:3306/tcc?useUnicode=true&characterEncoding=utf8
|
||||
username: root
|
||||
password: 123456
|
||||
|
Loading…
Reference in New Issue
Block a user