分布式事物 seata
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import com.czg.account.service.TestService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author GYJoker
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class TestController {
|
||||
|
||||
@Resource
|
||||
private TestService testService;
|
||||
|
||||
@RequestMapping("/hello")
|
||||
public String hello() {
|
||||
return testService.insertData();
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,10 @@ dubbo:
|
||||
application:
|
||||
name: account-server
|
||||
qos-port: 22221
|
||||
qos-enable: true
|
||||
# qos-enable: true
|
||||
registry:
|
||||
address: nacos://121.40.109.122:8848 # Nacos 服务地址
|
||||
group: server
|
||||
group: server-dev
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
protocol:
|
||||
port: 9101
|
||||
@@ -34,3 +34,13 @@ dubbo:
|
||||
threadpool: fixed
|
||||
|
||||
|
||||
seata:
|
||||
application-id: account-server
|
||||
tx-service-group: group_seata
|
||||
config:
|
||||
type: nacos
|
||||
nacos:
|
||||
server-addr: 121.40.109.122:8848
|
||||
namespace:
|
||||
group: group_seata
|
||||
|
||||
|
||||
@@ -34,3 +34,15 @@ dubbo:
|
||||
threads: 20
|
||||
threadpool: fixed
|
||||
|
||||
|
||||
|
||||
seata:
|
||||
application-id: account-server
|
||||
tx-service-group: group_seata
|
||||
config:
|
||||
type: nacos
|
||||
nacos:
|
||||
server-addr: 121.40.109.122:8848
|
||||
namespace:
|
||||
group: group_seata
|
||||
|
||||
|
||||
Reference in New Issue
Block a user