跳到主要内容

配置

CoreGlobalConfig

框架核心配置

PropertyNameTypeDefaultValueDescription
netIdint随机值网络进程 id,必须唯一。
timeoutMillisint3000请求超时时间
enableFragmentAssemblerbooleanfalseAeron FragmentAssembler
fragmentLimitint100Aeron 每次处理消息的数量上限
publisherBufferSizeint1024 * 64Aeron 传递消息的大小上限
devModebooleanfalse开发者模式

BarSkeletonSetting

业务框架相关设置

class OneApplication {
static void main() {
BarSkeletonSetting setting = CoreGlobalConfig.setting;
}
}
PropertyNameTypeDefaultValueDescription
cmdMaxLenint32主路由最大值
subCmdMaxLenint96子路由最大值
printbooleanfalse打印业务框架相关信息
validatorbooleanfalseJSR380 验证
validatorAutoCallbooleanfalseJSR380 自动验证
parseDocbooleanfalse解析源码文档。

当为 true 时可以获取源码行数,但会影响启动时间。 建议只在开发模式下启用。

ExternalGlobalConfig

对外服相关配置。

hello

PropertyNameTypeDefaultValueDescription
externalPortint10100对外服默认端口
accessAuthenticationHookAccessAuthenticationHook-路由访问权限配置
externalCmdCacheExternalCmdCache-对外服缓存配置
enableLoggerHandlerbooleantrue打印 NettyHandler 相关日志
websocketPathString/websocketwebsocketPath 连接地址。

Examples

"ws://127.0.0.1:10100/websocket"

maxFramePayloadLengthint1024 * 1024消息大小上限