Skip to content

Commit 0717122

Browse files
authored
readme
readme
1 parent 5d2f307 commit 0717122

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ flylib-boot是针对springboot构建的程序的基础框架,专门用于构
44

55
## 功能
66
包含一个Spring Boot的一些常见的基础组件的设置
7-
1. 针对Handler的全局的异常处理(处理所有Controller里的Handler里抛出的异常)
7+
**1. 针对Handler的全局的异常处理(处理所有Controller里的Handler里抛出的异常)
88
2. Filter
9-
3. Interceptor
9+
3. Interceptor**
1010

1111
注意:SpringBoot(SpringMVC)里的Handler特指@Controller注解的类里的每个处理HTTP请求的一个public method.
1212

1313
## 使用方法
14-
在自己的项目中添加flylib-boot-starter的maven依赖
14+
- Step 1: 进入目录flylib-boot-starter,执行<code>mvn install</code>
15+
- Step 2: 在自己的项目中添加flylib-boot-starter的maven依赖. 并留意自己使用的spring-boot版本,去修改自己的pom.xml文件
1516
```
1617
<dependency>
1718
<groupId>org.flylib</groupId>
@@ -74,7 +75,7 @@ flylib-boot是针对springboot构建的程序的基础框架,专门用于构
7475
7576
```
7677

77-
捕获异常的实例.
78+
- Step 3: 在自己的程序中new 一个UserException(自定义的异常类)设置捕获异常
7879
```
7980
@RequestMapping("")
8081
public String index() throws RuntimeException {
@@ -84,6 +85,7 @@ flylib-boot是针对springboot构建的程序的基础框架,专门用于构
8485
throw userException;
8586
}
8687
```
88+
- Step 4: 运行自己的Spring Boot项目
8789
输出到浏览器的结果
8890
```
8991
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy