Home
Sign Up
Sign In
V2EX
›
问与答
Java Service 接口返回的应该是大类型还是小类型
elliotloststh
·
Jul 24, 2020
· 1446 views
This topic created in 2294 days ago, the information mentioned may be changed or developed.
如题,本人新程序员,前辈说都该用大类型( Integer ),我觉得用小类型(基本类型 int ),不然岂不是判空等都要到 controller 层判断?望各位解惑
类型
判空
integer
int
2 replies
•
2020-07-25 00:02:21 +08:00
HuHui
Jul 24, 2020 via Android
1
看业务
wdlth
Jul 25, 2020
2
VO 要用包装类型,Controller 判断可以用 JSR-303,在 VO 上加注解。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4994 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 07:14
·
PVG 15:14
·
LAX 23:14
·
JFK 02:14
♥ Do have faith in what you're doing.
❯