Skip to content

Commit 7a876a4

Browse files
authored
Update index.md
1 parent 82ce068 commit 7a876a4

File tree

1 file changed

+20
-12
lines changed
  • blog/Building RESTful CRUD API in springboot

1 file changed

+20
-12
lines changed

blog/Building RESTful CRUD API in springboot/index.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,15 @@ public ResponseEntity<ApiResponseDto<?>> deleteUser(int id) throws UserServiceLo
432432
}
433433
```
434434

435-
Note:
436-
435+
:::note
437436
- The `@Service` annotation is used to indicate that a class is a service component in the Spring application context.
438437

439438
- The `@Component` annotation is a generic stereotype annotation used to indicate that a class is a Spring component. Components annotated with @Component are candidates for auto-detection when using Spring's component scanning feature.
440439

441440
- The `@Autowired` annotation is used to automatically inject dependencies into Spring-managed beans. When Spring encounters a bean annotated with @Autowired, it looks for other beans in the application context that match the type of the dependency and injects it.
442441

443442
- The `@Slf4j` annotation is not a standard Spring annotation but rather a Lombok annotation used for logging.
443+
:::
444444

445445
## Step 8: Create controller
446446

@@ -545,19 +545,27 @@ public class UserServiceExceptionHandler {
545545

546546
## Step 10: Run your application and test with postman/frontend😊.
547547

548-
Register user failed: User details invalid!<br/>
549-
<img src="./images/image03.png"><br/><br/>
548+
Register user failed: User details invalid!
549+
550+
<img src="./images/image03.png">
551+
552+
Register user successful
553+
554+
<img src="./images/image04.png">
555+
556+
557+
Retrieve all users
558+
559+
<img src="./images/image05.png">
560+
561+
562+
Update the details of John
550563

551-
Register user successful<br/>
552-
<img src="./images/image04.png"><br/><br/>
564+
<img src="./images/image06.png">
553565

554-
Retrieve all users<br/>
555-
<img src="./images/image05.png"><br/><br/>
556566

557-
Update the details of John<br/>
558-
<img src="./images/image06.png"><br/><br/>
567+
Delete user john
559568

560-
Delete user john<br/>
561-
<img src="./images/image07.png"><br/><br/>
569+
<img src="./images/image07.png">
562570

563571
Hey guys, that’s it. We have successfully developed rest crud API for a user management system.

0 commit comments

Comments
 (0)