0
私はspringMVCアプリケーションで作業しています。間に行を処理せずに直接ビューを返す要求マッピングがあります。Spring MVCはメソッド内のコンテンツをスキップするViewを直接返します
@RequestMapping(value = { "/testCnt" }, method = { RequestMethod.GET })
public ModelAndView testContent(HttpServletRequest request) {
log.debug("testing debug);
ModelAndView mnv = new ModelAndView();
log.debug("testssss");
log.debug("test purpose");
//some procesing here....Calling other methods and doing the required process
........
........
mnv.setViewName("returnjsp");
return mnv;
}
ので、上記のコードのために私は、ログ文に次のように見ることができます:
2017-11-26 22:01:56,388 DEBUG org.springframework.web.servlet.DispatcherServlet DispatcherServlet with name 'SiteServlet' processing GET request for [/mysite/site/ContentTest/testCnt]
2017-11-26 22:01:56,389 DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping Looking up handler method for path /ContentTest/testCnt
2017-11-26 22:01:56,394 DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping Returning handler method [public org.springframework.web.servlet.ModelAndView myproject.org.com.TestCountController.testContent(javax.servlet.http.HttpServletRequest)]
2017-11-26 22:01:56,394 DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory Returning cached instance of singleton bean 'testCountController'
2017-11-26 22:01:56,401 DEBUG org.springframework.web.servlet.DispatcherServlet Last-Modified value for [/portal/site/ContentTest/testCnt
] is: -1
2017-11-26 22:01:58,850 DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory Invoking afterPropertiesSet() on bean with name 'returnjsp'
私は実行の非常に最初の行で、ログに私のログステートメントを参照してくださいいけません。このメソッドでコンテンツを処理せずに、 "returnjsp"へのビューを直接返します。助けてください
誰でもお手伝いできますか? – Stack
ブレークポイントを設定しますか?おそらくあなたのログレベルはデバッグよりも低いでしょう。 – Bnrdo
@Bnrdo他のリクエストマッピングの他のすべてのログステートメントを見ることができます。サーバーがデバッグモードになっています:( – Stack