配置
CoreGlobalConfig
框架核心配置
| PropertyName | Type | DefaultValue | Description |
|---|---|---|---|
| netId | int | 随机值 | 网络进程 id,必须唯一。 |
| timeoutMillis | int | 3000 | 请求超时时间 |
| enableFragmentAssembler | boolean | false | Aeron FragmentAssembler |
| fragmentLimit | int | 100 | Aeron 每次处理消息的数量上限 |
| publisherBufferSize | int | 1024 * 64 | Aeron 传递消息的大小上限 |
| devMode | boolean | false | 开发者模式 |
BarSkeletonSetting
业务框架相关设置
class OneApplication {
static void main() {
BarSkeletonSetting setting = CoreGlobalConfig.setting;
}
}
| PropertyName | Type | DefaultValue | Description |
|---|---|---|---|
| cmdMaxLen | int | 32 | 主路由最大值 |
| subCmdMaxLen | int | 96 | 子路由最大值 |
| boolean | false | 打印业务框架相关信息 | |
| validator | boolean | false | JSR380 验证 |
| validatorAutoCall | boolean | false | JSR380 自动验证 |
| parseDoc | boolean | false | 解析源码文档。 当为 true 时可以获取源码行数,但会影响启动时间。 建议只在开发模式下启用。 |
ExternalGlobalConfig
对外服相关配置。
hello
| PropertyName | Type | DefaultValue | Description |
|---|---|---|---|
| externalPort | int | 10100 | 对外服默认端口 |
| accessAuthenticationHook | AccessAuthenticationHook | - | 路由访问权限配置 |
| externalCmdCache | ExternalCmdCache | - | 对外服缓存配置 |
| enableLoggerHandler | boolean | true | 打印 NettyHandler 相关日志 |
| websocketPath | String | /websocket | websocketPath 连接地址。 Examples
|
| maxFramePayloadLength | int | 1024 * 1024 | 消息大小上限 |