tweaked setup for mapping of controllers

pull/59/head
Justin Richer 2012-02-27 11:56:29 -05:00
parent 4dc1625496
commit c46e0f1969
2 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping("/") @RequestMapping("/")
public class ManagerController { public class ManagerController {
@RequestMapping({"/", "/home", "/index"}) @RequestMapping({"", "/home", "/index"})
public String showHomePage() { public String showHomePage() {
return "home"; return "home";
} }

View File

@ -68,7 +68,10 @@
<task:scheduler id="taskScheduler" pool-size="10" /> <task:scheduler id="taskScheduler" pool-size="10" />
<task:executor id="taskExecutor" pool-size="5" /> <task:executor id="taskExecutor" pool-size="5" />
<task:annotation-driven scheduler="taskScheduler" executor="taskExecutor" /> <task:annotation-driven scheduler="taskScheduler" executor="taskExecutor" />
<context:component-scan annotation-config="true" base-package="org.mitre" /> <!-- load everything except controllers (those get handled elsewhere) -->
<context:component-scan annotation-config="true" base-package="org.mitre">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
</beans> </beans>