67,550
社区成员




@Controller
@RequestMapping("/test")
public class TestController {
private AppService appService;
@RequestMapping(method = RequestMethod.GET)
public String list(Model model) {
model.addAttribute("appList", appService.findAll());
return "app/list";
}
@RequiresPermissions("app:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String showCreateForm(Model model) {
App app = new App();
app.setAppKey(UUID.randomUUID().toString());
app.setAppSecret(UUID.randomUUID().toString());
model.addAttribute("app", app);
model.addAttribute("op", "新增");
return "app/edit";
}
}
<context:component-scan base-package="com.common.authorition.**.web.controller" use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller"/>
<context:include-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
</context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<context:component-scan base-package="com.common.authorition.shiro.server">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>