refactor: 验证资源池方式采用非事务方式
This commit is contained in:
parent
5e8dc975e8
commit
83b4264a1d
|
@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ public class NodeResourcePoolService {
|
||||||
@Resource
|
@Resource
|
||||||
private TestResourceMapper testResourceMapper;
|
private TestResourceMapper testResourceMapper;
|
||||||
|
|
||||||
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||||
public boolean validate(TestResourcePoolDTO testResourcePool) {
|
public boolean validate(TestResourcePoolDTO testResourcePool) {
|
||||||
if (CollectionUtils.isEmpty(testResourcePool.getResources())) {
|
if (CollectionUtils.isEmpty(testResourcePool.getResources())) {
|
||||||
MSException.throwException(Translator.get("no_nodes_message"));
|
MSException.throwException(Translator.get("no_nodes_message"));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 28ecc93bc3da92780fefde127e72ab2bd743052f
|
Subproject commit ca9bd63b69870cb3f937719fa1addcfe2f732b38
|
Loading…
Reference in New Issue