修改到8的版本
This commit is contained in:
parent
15e84f54af
commit
790554d773
8
pom.xml
8
pom.xml
|
@ -11,9 +11,9 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<java.version>8</java.version>
|
||||
|
||||
<protobuf.version>3.20.1</protobuf.version>
|
||||
<protostuff.version>1.7.4</protostuff.version>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<nacos.version>2.1.0</nacos.version>
|
||||
<snakeyaml.version>1.30</snakeyaml.version>
|
||||
|
||||
<yuandian.common.config.version>1.0.2</yuandian.common.config.version>
|
||||
<yuandian.common.config.version>1.0.4</yuandian.common.config.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
@ -5,6 +5,9 @@ import com.yuandian.common.Config;
|
|||
import com.yuandian.dataflow.statemachine.RaftClosure;
|
||||
import com.yuandian.dataflow.statemachine.StateMachine;
|
||||
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
|
|||
|
||||
import com.alipay.sofa.jraft.Closure;
|
||||
import com.alipay.sofa.jraft.entity.Task;
|
||||
|
||||
|
||||
import com.yuandian.dataflow.Server;
|
||||
import com.yuandian.dataflow.projo.Response;
|
||||
import com.yuandian.dataflow.statemachine.RaftClosure;
|
||||
|
@ -13,7 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
import org.apache.commons.lang.ObjectUtils.Null;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.alipay.sofa.jraft.Node;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
public class TaskLog {
|
||||
|
@ -33,30 +32,29 @@ public class TaskLog {
|
|||
// private static final Logger log = LoggerFactory.getLogger(TaskLog.class);
|
||||
private static Node node = Server.GetNode();
|
||||
|
||||
@GetMapping(path = "/test")
|
||||
@GetMapping(path = "/test")
|
||||
public ResponseEntity<Response> Processing(@RequestBody int status) {
|
||||
|
||||
Task task = new Task();
|
||||
|
||||
|
||||
log.error(node.toString());
|
||||
|
||||
|
||||
RaftClosure done = new RaftClosure();
|
||||
task.setData(ByteBuffer.wrap("hello".getBytes()));
|
||||
task.setDone(done);
|
||||
task.setDone(done);
|
||||
Server.GetNode().apply(task);
|
||||
|
||||
Response response = new Response();
|
||||
|
||||
Response response = new Response();
|
||||
|
||||
response.Code = HttpStatus.OK;
|
||||
response.Message = HttpStatus.OK.toString();
|
||||
return new ResponseEntity<Response>(response, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(path = "/test2")
|
||||
public ResponseEntity<Response> MongodbTest(@RequestBody int status) {
|
||||
public ResponseEntity<Response> MongodbTest(@RequestBody int status) {
|
||||
|
||||
Response response = new Response();
|
||||
Response response = new Response();
|
||||
return new ResponseEntity<Response>(response, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.yuandian.dataflow.proto.msgtype.BussFlowWebOuterClass.BussFlowWeb;
|
|||
|
||||
import io.grpc.ManagedChannelBuilder;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
import lombok.var;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
|
@ -70,7 +71,7 @@ public class CollectPackets extends CollectPacketsServerImplBase {
|
|||
|
||||
domap.put(Any.pack(BussFlowWeb.newBuilder().build()).getTypeUrl(), (p)->{
|
||||
try {
|
||||
p.unpack(BussFlowWeb.class);
|
||||
var msg = p.unpack(BussFlowWeb.class);
|
||||
} catch (InvalidProtocolBufferException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
@ -91,7 +92,7 @@ public class CollectPackets extends CollectPacketsServerImplBase {
|
|||
|
||||
domap.put(Any.pack(BussFlowOrl.newBuilder().build()).getTypeUrl(), (p)->{
|
||||
try {
|
||||
p.unpack(BussFlowOrl.class);
|
||||
var msg = p.unpack(BussFlowOrl.class);
|
||||
} catch (InvalidProtocolBufferException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -21,6 +21,7 @@ import io.netty.handler.codec.compression.ZlibDecoder;
|
|||
import lombok.Cleanup;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.var;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
Subproject commit 894a81469d0074a0b9dc707201c0fdb24049f41d
|
||||
Subproject commit e7efff5fd246db0ffb5e88488a149e19d037c10c
|
|
@ -31,6 +31,7 @@ import io.netty.handler.codec.dns.DatagramDnsQuery;
|
|||
import lombok.Cleanup;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.var;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user