我做hellocontroller的時候是成功了,但是做第一個頁面的時候就一直404了?下面貼出日志
1600 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/courses/view]
1600 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/courses/view]
1602 [qtp1743310468-14] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping ?- Looking up handler method for path /courses/view
1602 [qtp1743310468-14] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping ?- Looking up handler method for path /courses/view
1602 [qtp1743310468-14] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping ?- Did not find handler method for [/courses/view]
1602 [qtp1743310468-14] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping ?- Did not find handler method for [/courses/view]
1603 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- Matching patterns for request [/courses/view] are [/**]
1603 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- Matching patterns for request [/courses/view] are [/**]
1603 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- URI Template variables for request [/courses/view] are {}
1603 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- URI Template variables for request [/courses/view] are {}
1604 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- Mapping [/courses/view] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@603d6637] and 1 interceptor
1604 [qtp1743310468-14] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ?- Mapping [/courses/view] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@603d6637] and 1 interceptor
1604 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Last-Modified value for [/courses/view] is: -1
1604 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Last-Modified value for [/courses/view] is: -1
1609 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
1609 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
1609 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Successfully completed request
1609 [qtp1743310468-14] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Successfully completed request
2017-01-18
@AutoWired有沒有配好?
2016-08-07
需要貼你的源碼看下啊
2016-07-09
Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
這個錯誤提示,好像是說你的返回沒有指定到已知的頁面,你可以查看下springMVC的配置是否正確,然后,controller的方法返回的頁面名稱是否存在