Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07b891b

Browse files
[update] README.md
1 parent 6a9fba5 commit 07b891b

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

‎README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
11. 第三方接口调用`RestTemplate`
2020
12. 常用配置(见application.properties)
2121

22-
###更多内容,持续更新
22+
###更多内容,持续更新
2323

2424
---
2525

@@ -29,30 +29,30 @@
2929
父pom.xml文件中
3030

3131
```xml
32-
<groupId>demo</groupId>
33-
<artifactId>parent</artifactId>
34-
<version>0.0.1-SNAPSHOT</version>
35-
<name>parent</name>
36-
<!--必须指定为pom-->
37-
<packaging>pom</packaging>
38-
<!--指定子模块-->
39-
<modules>
40-
<module>web</module>
41-
<module>service</module>
42-
</modules>
32+
<groupId>demo</groupId>
33+
<artifactId>parent</artifactId>
34+
<version>0.0.1-SNAPSHOT</version>
35+
<name>parent</name>
36+
<!--必须指定为pom-->
37+
<packaging>pom</packaging>
38+
<!--指定子模块-->
39+
<modules>
40+
<module>web</module>
41+
<module>service</module>
42+
</modules>
4343
```
4444

4545
子模块pom.xml中
4646

4747
```xml
48-
<!--指定parent-->
49-
<parent>
50-
<groupId>demo</groupId>
51-
<artifactId>parent</artifactId>
52-
<version>0.0.1-SNAPSHOT</version>
53-
<!--上面的三个可以直接copy父pom.xml中的内容-->
54-
<relativePath>../pom.xml</relativePath>
55-
</parent>
48+
<!--指定parent-->
49+
<parent>
50+
<groupId>demo</groupId>
51+
<artifactId>parent</artifactId>
52+
<version>0.0.1-SNAPSHOT</version>
53+
<!--上面的三个可以直接copy父pom.xml中的内容-->
54+
<relativePath>../pom.xml</relativePath>
55+
</parent>
5656
```
5757

5858
详见本项目代码
@@ -63,14 +63,14 @@
6363
若入参是对象,则给该对象的类加上`@Validated`, 注意`@Valid`不要漏了,否则不会生效
6464

6565
```java
66-
/**
67-
* 参数校验2,入参为json数据
68-
* 异常类型:{@link org.springframework.web.bind.MethodArgumentNotValidException}
69-
*/
70-
@PostMapping("/param1")
71-
public User param1(@Valid @RequestBody User user) {
72-
return user;
73-
}
66+
/**
67+
* 参数校验2,入参为json数据
68+
* 异常类型:{@link org.springframework.web.bind.MethodArgumentNotValidException}
69+
*/
70+
@PostMapping("/param1")
71+
public User param1(@Valid @RequestBody User user) {
72+
return user;
73+
}
7474
```
7575

7676
```java
@@ -118,5 +118,5 @@ spring.servlet.multipart.max-request-size=10MB
118118

119119
#### More
120120

121-
更多内容,持续更新,感谢**`Star`**
121+
更多内容,持续更新,感谢`Star`
122122

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /