Broadleaf Commerce admin controller not working

你。 提交于 2019-12-12 06:05:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!