Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpringBoot学习笔记:RESTful应用接口 #92

Open
QiYongchuan opened this issue Mar 19, 2024 · 1 comment
Open

SpringBoot学习笔记:RESTful应用接口 #92

QiYongchuan opened this issue Mar 19, 2024 · 1 comment
Labels
notes notes

Comments

@QiYongchuan
Copy link
Owner

QiYongchuan commented Mar 19, 2024

什么是RESTful?

REST(Representational State Transfer)是一组设计原则,用于构建网络服务。RESTful服务意味着遵循这些设计原则的服务。

image
image

image
image
image

@QiYongchuan
Copy link
Owner Author

SpringBoot 实现RESTful API

image
image

动态参数的获取

image

注意:两种类型的参数,
一种是通过url传过来的(比如用户的id),此时需要动态参数的获取,即使用@PathVariable获取到参数
比如获取(get) 和删除(delete)的应用场景
一种则直接通过body请求体传过来的数据,
此时直接通过实体类接受了
比如添加用户,更新用户。

image

@QiYongchuan QiYongchuan added the notes notes label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes notes
Projects
None yet
Development

No branches or pull requests

1 participant