result && result['success']比單純的result['success']效率高吧
if(result && result['success']){} 這個老師用的有點多呀,一個方法內前面已經判斷了,后面還在這樣判斷,是不是有點啰嗦?
我的 $.get(seckill.URL.now(),{},function(result){.....} ) 沒有回調 function(result){.....} 而是將return結果轉發至/WEB-INF/jsp/seckill/time/now.jsp 這怎么搞
這里有個小問題, 使用annotation-driven, 在3.1之后, handler映射和適配Spring使用的是RequestMappingHandlerMapping和RequestMappingHandlerAdapter, 打斷點走一遍DispatcherServlet#doDispatch可以看到, 而且異常解析器也使用了新的ExceptionHandlerExceptionResolver
參考 http://stackoverflow.com/questions/8162459/what-does-mvcannotation-driven-do
參考 http://stackoverflow.com/questions/8162459/what-does-mvcannotation-driven-do
2017-04-08
注意:如果按照老師的servlet3.1+jdk1.8. tomcat必須是8.0才可以。7啟動失敗。。。。
2017-04-08