public void test(int a, Catalog catalog) {
catalog.name = "类别";
a = 2;
}
int a = 3;
Catalog catalog = new catalog(name="性别");
test(a, catelog);
print(a)
print(catelog.name);
请简要说明 最后两端的打印值,以及原因
private Listlist; // 这个T是 ICatalogService 还是 catalogServiceImpl private T catalogService; @GetMapping() public Result delete(@RequestParam(name="id",required=true) String id) { if(!checkPremission(id)){ return Result.OK("权限不足!"); } catalogService.removeById(id); list.remove(0); return Result.OK("删除成功!"); }
- catalogService这个变量指向的类型是:接口还是实现类,说明理由。
- 如果我们要做权限保护,A创建的分类,不允许B删除,那权限代码应该怎么写,写在哪里,能用AOP的方式实现吗(简易实现)
- 如果按照restful的风格,这个代码应该怎么改。



