File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -61,3 +61,8 @@ ApiResponse的结构类似SmartAdmin中ResponseDTO。response = headers + status
61
61
```
62
62
"nop.err.my-error?myParam=xx" : "异常消息A"
63
63
```
64
+
65
+ 6 . 异常消息定制
66
+ 异常码对应的异常消息可以通过i18n文件进行定制。例如在 ` /i18n/zh-CN/error.i18n.yaml ` 文件中为每个错误码指定对应的错误消息,它会替代错误码定义时所使用的缺省消息。
67
+ I18nMessageManager会自动读取` _vfs/i18n/ ` 目录下所有的不以下划线为前缀的` i18n.yaml ` 文件。Nop平台并没有约定一定要在` error.i18n.yaml ` 中定制错误消息,这里的名称是自定义的。
68
+
Original file line number Diff line number Diff line change 17
17
* ` nop.ioc.app-beans-container.concurrent-start ` 设置为true, 则启动时在线程池上执行bean容器的初始化操作,不阻塞主线程
18
18
19
19
## 优化应用运行时性能
20
+
20
21
* ` nop.debug ` 设置为false, 就不会在dump目录下产生输出
21
22
* ` nop.core.component.resource-cache.check-changed ` 设置为false,则不会检查资源文件是否有变化,不会自动更新缓存的解析结果。
22
23
* 将日志级别设置为info,减少日志输出
23
24
25
+ ## 查看统计信息
26
+
27
+ 通过prometheus度量对外暴露了Metrics信息。在quarks框架下使用` /q/metrics `
28
+ 查看统计信息。在springboot框架下,使用` /actuator/prometheus ` 查看统计信息。
29
+
30
+ 通过stat链接来查看Nop平台内部的细粒度的统计信息
24
31
32
+ 1 . ` /r/DevStat__jdbcSqlStats ` 查看每一个sql语句的执行时间、执行次数以及时间范围分布
33
+ 2 . ` /r/DevStat__rpcServerStats ` 查看每一个后台服务函数的执行时间、执行次数,以及时间范围分布
34
+ 3 . ` /r/DevStat__rpcClientStats ` 查看每一个rpc客户端调用的执行时间、执行次数,以及时间范围分布
You can’t perform that action at this time.
0 commit comments