mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-20 06:24:12 +00:00
perf[protocol]:增加支持protocul文件支持配置包名和有优化probuf文件读取
This commit is contained in:
@@ -213,7 +213,7 @@ public class ProtocolAnalysis {
|
||||
var clazz = Class.forName(location);
|
||||
var protocolId = ProtocolManager.protocolId(clazz);
|
||||
var registration = parseProtocolRegistration(clazz, module);
|
||||
if (!clazz.isAnnotationPresent(NotEnhance.class)) {
|
||||
if (protocolDefinition.isEnhance()) {
|
||||
enhanceList.add(registration);
|
||||
}
|
||||
// 注册协议
|
||||
|
||||
@@ -16,7 +16,7 @@ package com.zfoo.protocol.xml;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
|
||||
@JsonPropertyOrder({"id", "location"})
|
||||
@JsonPropertyOrder({"id", "location", "enhance"})
|
||||
public class XmlProtocolDefinition {
|
||||
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "id")
|
||||
@@ -25,6 +25,10 @@ public class XmlProtocolDefinition {
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "location")
|
||||
private String location;
|
||||
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "enhance")
|
||||
private boolean enhance = true;
|
||||
|
||||
|
||||
public short getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -33,4 +37,8 @@ public class XmlProtocolDefinition {
|
||||
return location;
|
||||
}
|
||||
|
||||
public boolean isEnhance() {
|
||||
return enhance;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user