问题
I am adding a custom section in admin panel in broadleaf commerce referring this tutorial http://www.broadleafcommerce.com/docs/core/current/broadleaf-concepts/admin/admin-custom-controllers This is my controller class
@Controller
// @RequestMapping("/" + NewAdminSection.SECTION_KEY)
@Secured("PERMISSION_OTHER_DEFAULT")
public class NewAdminSection extends AdminAbstractController {
protected static final String SECTION_KEY = "test";
@RequestMapping(value = "/test", method = RequestMethod.GET)
public String test(HttpServletRequest request,
HttpServletResponse response, Model model) throws Exception {
// This is expected by the modules/emptyContainer template, this is a
// custom template that gets included into the body
model.addAttribute("customView", "views/test");
// ensure navigation gets set up correctly
setModelAttributes(model, SECTION_KEY);
// gets the scaffolding set up to display the template from the
// customView attribute above
return "modules/emptyContainer";
}
}
I have done entry in "applicationContext-servlet-admin.xml" file I also have done entries in database as instructed in tutorial
When I hit URL http://localhost:8080/admin/test I get a blank page,Status of call is 200(OK). I also debugged the code but call in not reaching to my controller In logs I can see my mappings are getting mapped. can any buddy help where I am going wrong?
来源:https://stackoverflow.com/questions/29077389/broadleaf-commerce-admin-controller-not-working