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

你好,有给后端传JSON数组的写法吗? #120

Closed
C01day opened this issue Mar 2, 2023 · 3 comments
Closed

你好,有给后端传JSON数组的写法吗? #120

C01day opened this issue Mar 2, 2023 · 3 comments

Comments

@C01day
Copy link

C01day commented Mar 2, 2023

好像传的都是单个JSON

@Heeexy
Copy link
Owner

Heeexy commented Mar 2, 2023

https://zhuanlan.zhihu.com/p/89223401 看看这篇文章里有没有你需要的

@Heeexy Heeexy closed this as completed Mar 2, 2023
@C01day
Copy link
Author

C01day commented Mar 2, 2023

好的多谢,还想请问一下,为什么有些接收参数用的是HttpServletRequest request,有的是@RequestBody JSONObject requestJson,第一次用不太懂,想请教一下,谢谢

@Heeexy
Copy link
Owner

Heeexy commented Mar 2, 2023

没有什么讲究的,是我写简单的crud就偷懒都用 JSONObject。
get请求也把url里的参数通过 CommonUtil.request2Json(request) 转成了JSONObject

这项目只是想展示权限设计的思路,不要把项目里的代码当成规范的哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants