1. Narrow the request mapping
Do RequestMapping annotation on the class.
Benefits: Avoid duplication of urls with other people in the same project, resulting in request confusion, and easy management.
1 @Controller 2 @RequestMapping(value = "/goods") 3 public class goodsController { 4 @Resource(name="goodsServiceImpl") 5 private goodsService goodsService;