我有以下内容:
@Controller
@RequestMapping("/admin")
public class AdminController extends BaseHtmlController{
@Autowired
protected DeviceCustomerMap deviceCustomerMap;
@Autowired
protected CustomerDao customerDao;
String layout = "template/admin";
@RequestMapping(value="/login", method = RequestMethod.GET)
public String login(ModelMap model) {
model.addAttribute("meta", meta);
String view = "login";
return view;
}
}
public class AdminCustomerController extends AdminController{
@RequestMapping(value="/customer/mapping", method = RequestMethod.GET)
public String customerMapping(ModelMap model, @RequestParam(required=false) boolean refresh) throws Exception {
if (refresh){
deviceCustomerMap.initCustomerUrlMap();
}
model.addAttribute("meta", meta);
model.addAttribute("view", "customer/mapping");
model.addAttribute("customers", deviceCustomerMap.getCustomerMap());
return layout;
}
}
但是,扩展控制器不解决请求,但是当它们在基本控制器中时,它们被解决得很好,我已经浏览了几个线程但找不到解决方案,知道吗?