![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
经验
Kevinten10
Using Java/Scala/Python/Golang at work.
Research Stream and Reactive System.
Follow up Artificial Intelligence & Big Data & Cloud.
展开
-
返回Null还是抛出异常?
观点:如果返回null是一个正常行为,则返回null,如果是一个错误,则抛出Exception。观点:1、如果返回null是一个正常行为,则返回null。但在命名时最好给用户以提示,例如GetUserOrNull(string userName, string password)这样的函数名。2、如果是错误,则抛出Exception。...原创 2018-06-29 22:31:17 · 4089 阅读 · 0 评论 -
springMVC注解继承问题
1、外部注解可继承如@ResponseBody@RequestMapping(method = RequestMethod.GET)子类可以具有此功能 2、参数注解无法继承如(@PathVariable String arg)子类无法接收到路径参数即使/{arg}也在父类注解中,参数注解也无法使用但可以在子类中加入参数注解 3、若父类与子类具有...原创 2018-07-27 15:43:59 · 2169 阅读 · 0 评论