标签:spring tca 使用 ping 自动 list category 多个 public
可以
@Controller
@RequestMapping("")
public class CategoryController {
@Autowired//虽然注释的是接口,但是spring会自动找到实现类,如果没有则报错,如果有多个也报错, 可以使用@Qualifer指定?
CategoryService categoryService;
@RequestMapping("admin_category_list")
public String list(Model model){
List<Category> cs = categoryService.list();
model.addAttribute("cs",cs);
return "admin/listCategory";
}
}
标签:spring tca 使用 ping 自动 list category 多个 public
原文地址:https://www.cnblogs.com/zhuob/p/12289675.html