10:49:23,400 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'Dispatcher' processing GET request for [/group/]
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] DispatcherServlet with name 'Dispatcher' processing GET request for [/group/]
10:49:23,402 DEBUG RequestMappingHandlerMapping:304 - Looking up handler method for path /
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]-[DEBUG] Looking up handler method for path /
10:49:23,403 DEBUG RequestMappingHandlerMapping:314 - Did not find handler method for [/]
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]-[DEBUG] Did not find handler method for [/]
10:49:23,403 WARN PageNotFound:1147 - No mapping found for HTTP request with URI [/group/] in DispatcherServlet with name 'Dispatcher'
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.PageNotFound]-[WARN] No mapping found for HTTP request with URI [/group/] in DispatcherServlet with name 'Dispatcher'
10:49:23,403 DEBUG DispatcherServlet:1000 - Successfully completed request
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] DispatcherServlet with name 'Dispatcher' processing GET request for [/group/]
10:49:23,402 DEBUG RequestMappingHandlerMapping:304 - Looking up handler method for path /
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]-[DEBUG] Looking up handler method for path /
10:49:23,403 DEBUG RequestMappingHandlerMapping:314 - Did not find handler method for [/]
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]-[DEBUG] Did not find handler method for [/]
10:49:23,403 WARN PageNotFound:1147 - No mapping found for HTTP request with URI [/group/] in DispatcherServlet with name 'Dispatcher'
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.PageNotFound]-[WARN] No mapping found for HTTP request with URI [/group/] in DispatcherServlet with name 'Dispatcher'
10:49:23,403 DEBUG DispatcherServlet:1000 - Successfully completed request
sionPattern=2018-06-21 10:49:23 [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Successfully completed request
@Controller
@RequestMapping(value="/api")
public class HelloController {
@Controller
@RequestMapping(value="/api")
public class HelloController {
@RequestMapping("/hello")
public ModelAndView hello(){
System.out.print("进来了");
ModelAndView mv =new ModelAndView();
mv.addObject("spring", "spring mvc");
mv.setViewName("hello");
return mv;
}
}
@RequestMapping(value="/api")新增这个注解
然后新增访问路径新增api