鸟枪手
2017-06-20 10:06
采纳率: 50%
浏览 3.2k
已采纳

springmvc 入门 controller /index返回index.jsp

logbak: 17:22:30.105 o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcher' processing GET request for [/hello/index]
logbak: 17:22:30.106 o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /index
logbak: 17:22:30.111 o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/index]
logbak: 17:22:30.111 o.s.w.s.h.SimpleUrlHandlerMapping - Mapping [/index] to HandlerExecutionChain with handler [org.springframework.web.servlet.mvc.ParameterizableViewController@6b54afba] and 1 interceptor
logbak: 17:22:30.112 o.s.web.servlet.DispatcherServlet - Last-Modified value for [/hello/index] is: -1
本次请求处理时间为:10ms
logbak: 17:22:30.115 o.s.web.servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.JstlView: name '/index'; URL [/WEB-INF/classes/views//index.jsp]] in DispatcherServlet with name 'dispatcher'
logbak: 17:22:30.118 o.s.web.servlet.view.JstlView - Forwarding to resource [/WEB-INF/classes/views//index.jsp] in InternalResourceView '/index'
logbak: 17:22:30.120 o.s.web.servlet.DispatcherServlet - Successfully completed request

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

4条回答 默认 最新

  • 小静ya 2017-06-20 12:30
    最佳回答
       <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
            <property name="prefix" value="/" />
            <property name="suffix" value=".jsp" />
            <property name="contentType">
                <value>text/html;charset=UTF-8</value>
            </property>
        </bean>
    
    评论
    解决 无用
    打赏 举报
查看更多回答(3条)

相关推荐 更多相似问题