Skip to content

Commit ae49e6e

Browse files
author
litongjava
committed
add code language
1 parent 68b1af0 commit ae49e6e

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

docs/zh/99_案例/01.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,19 @@ CREATE TABLE IF NOT EXISTS `sys_user_info` (
3737

3838
1.2.添加依赖
3939
添加的依赖有
40-
tio-boot
41-
slf4j-api
42-
lombok
43-
hotswap-classloader
44-
table-to-json
45-
mysql-connector-java
46-
HikariCP
47-
sa-token-core
48-
jfinal-plugins
49-
jedis
50-
fst
51-
junit
40+
41+
- tio-boot
42+
- slf4j-api
43+
- lombok
44+
- hotswap-classloader
45+
- table-to-json
46+
- mysql-connector-java
47+
- HikariCP
48+
- sa-token-core
49+
- jfinal-plugins
50+
- jedis
51+
- fst
52+
- junit
5253

5354
```xml
5455
<properties>
@@ -145,7 +146,7 @@ app.env=dev
145146

146147
app-dev.properties
147148

148-
```
149+
```propreties
149150
jdbc.url=jdbc:mysql://192.168.3.9/enote?characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=UTC
150151
jdbc.user=root
151152
jdbc.pswd=robot_123456#
@@ -160,7 +161,7 @@ redis.timeout=15000
160161

161162
i18n_en_US.properties
162163

163-
```
164+
```properties
164165
The_username_or_password_cannot_be_empty=The username or password cannot be empty
165166
The_locale_cannot_be_empty=The locale cannot be empty
166167
The_userChannel_cannot_be_empty=The userChannel cannot be empty
@@ -176,7 +177,7 @@ The_username_exists=The username exists
176177

177178
i18n_zh_CN.properties
178179

179-
```
180+
```properties
180181
The_username_or_password_cannot_be_empty=用户名或者密码不能为空
181182
The_locale_cannot_be_empty=locale不能为空
182183
The_userChannel_cannot_be_empty=The userChannel不能为空

docs/zh/99_案例/02.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#### 代码片段:pom.xml
1717

18-
```
18+
```xml
1919
<properties>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2121
<java.version>1.8</java.version>
@@ -99,7 +99,7 @@
9999

100100
#### 文件内容:app.properties
101101

102-
```
102+
```properties
103103
app.name=tio-boot-example-push-exception-to-wecome-demo
104104
notification.webhook.url=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxx
105105
```
@@ -110,7 +110,7 @@ notification.webhook.url=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xx
110110

111111
#### 代码片段:ExceptionPushToWecomeApp.java
112112

113-
```
113+
```java
114114
package com.litongjava.tio.web.hello;
115115

116116
import com.litongjava.jfinal.aop.annotation.AComponentScan;
@@ -132,7 +132,7 @@ public class ExceptionPushToWecomeApp {
132132

133133
创建自定义的异常处理器 `GlobalExceptionHadler`,在处理器中捕获异常并构建告警信息,最后通过企业微信 Webhook 接口发送到微信群。
134134

135-
```
135+
```java
136136
import java.io.PrintWriter;
137137
import java.io.StringWriter;
138138
import java.util.Date;
@@ -190,7 +190,7 @@ public class GlobalExceptionHadler implements TioBootExceptionHandler {
190190

191191
#### 代码片段:TioBootServerConfiguration.java
192192

193-
```
193+
```java
194194
import com.litongjava.jfinal.aop.annotation.AConfiguration;
195195
import com.litongjava.jfinal.aop.annotation.AInitialization;
196196
import com.litongjava.tio.boot.server.TioBootServer;
@@ -210,7 +210,7 @@ public class TioBootServerConfiguration {
210210

211211
开发一个简单的控制器,用于模拟触发异常的场景。
212212

213-
```
213+
```java
214214
package com.litongjava.tio.web.hello.controller;
215215

216216
import com.litongjava.tio.http.server.annotation.RequestPath;
@@ -233,7 +233,7 @@ public class ExceptionController {
233233

234234
#### 企业微信群收到的告警信息示例:
235235

236-
```
236+
```log
237237
Alarm Time : 2024-02-04 10:43:08
238238
App Group Name : tio-boot
239239
App Name : tio-boot-example-push-exception-to-wecome-demo

0 commit comments

Comments
 (0)