mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
fix checkstyle
Signed-off-by: slievrly <slievrly@163.com>
This commit is contained in:
parent
fbd72a6000
commit
f36c94d3ed
@ -19,7 +19,6 @@ package com.alibaba.cloud.examples;
|
||||
import java.util.Random;
|
||||
|
||||
import io.seata.core.context.RootContext;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -44,7 +44,8 @@ public class DatabaseConfiguration {
|
||||
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
|
||||
jdbcTemplate.update("delete from account_tbl where user_id = 'U100001'");
|
||||
jdbcTemplate.update("insert into account_tbl(user_id, money) values ('U100001', 10000)");
|
||||
jdbcTemplate.update(
|
||||
"insert into account_tbl(user_id, money) values ('U100001', 10000)");
|
||||
|
||||
return jdbcTemplate;
|
||||
}
|
||||
|
@ -18,9 +18,7 @@ package com.alibaba.cloud.examples;
|
||||
|
||||
import com.alibaba.cloud.examples.BusinessApplication.OrderService;
|
||||
import com.alibaba.cloud.examples.BusinessApplication.StorageService;
|
||||
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -92,7 +90,8 @@ public class HomeController {
|
||||
ResponseEntity<String> response;
|
||||
try {
|
||||
response = restTemplate.postForEntity(url, request, String.class);
|
||||
} catch (Exception exx) {
|
||||
}
|
||||
catch (Exception exx) {
|
||||
return "mock error";
|
||||
}
|
||||
result = response.getBody();
|
||||
|
@ -45,7 +45,8 @@ public class DatabaseConfiguration {
|
||||
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
|
||||
jdbcTemplate.update("delete from storage_tbl where commodity_code = 'C00321'");
|
||||
jdbcTemplate.update("insert into storage_tbl(commodity_code, count) values ('C00321', 100)");
|
||||
jdbcTemplate.update(
|
||||
"insert into storage_tbl(commodity_code, count) values ('C00321', 100)");
|
||||
|
||||
return jdbcTemplate;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user