scope="session"和scope="request"--丟擲異常非常的bug+垃圾
我改了下終於改好了,改到一個另外的一個類裡面別放在@Controller類裡,因為這裡有直接掃描的程式碼,總之很矛盾
package com.wanju.project001.zonghe.common.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.wanju.project001.zonghe.common.interfaces.IUserOperation;
import com.wanju.project001.zonghe.common.model.Article;
import com.wanju.project001.zonghe.common.model.RequestScopeBeanTestBean;
@Controller
@RequestMapping("/article")
public class UserController {
@Autowired
IUserOperation userMapper;
// @Autowired
// RequestScopeTestBean requestScopeTestBean;
@RequestMapping("/list")
public ModelAndView listall(HttpServletRequest request,HttpServletResponse response){
List<Article> articles=userMapper.getUserArticles(1);
ModelAndView mav=new ModelAndView("list");
// System.out.println(requestScopeTestBean.getName());
RequestScopeBeanTestBean requestScopeBeanTestBean = new RequestScopeBeanTestBean();
requestScopeBeanTestBean.test();
mav.addObject("articles",articles);
return mav;
}
}
|
#1 得分:5回覆於: 2009-09-02
02:27:56
|
|
#2 得分:0回覆於: 2009-09-02
07:23:39
|
|
|
|
#3 得分:5回覆於: 2009-09-02
07:35:18
|
#4 得分:0回覆於: 2009-09-02
15:33:10
|
|
|
#5 得分:15回覆於: 2009-09-02
23:36:23
|
#6 得分:0回覆於: 2009-09-03
22:11:42
|
|
#7 得分:5回覆於: 2009-09-03
22:16:47
|
|
#8 得分:5回覆於: 2009-09-03
22:39:48
|
|
|
#9 得分:10回覆於: 2009-09-03
22:43:04
|
|
#10 得分:0回覆於: 2009-09-03
23:10:25
|
|
#11 得分:5回覆於: 2009-09-03
23:17:41
|
|
#12 得分:0回覆於: 2009-09-06
16:46:54
|
相關文章
- 終於搞懂Spring中Scope為Request和Session的Bean了SpringSessionBean
- hibernate open session in view 丟擲異常解決方法SessionView
- oracle主動丟擲異常Oracle
- Swift 中 throws 異常丟擲Swift
- 啪,還敢丟擲異常
- 使用scope="session"的javaBean時,經常會出現ClassCastExceptionSessionJavaBeanASTException
- Java異常十一:使用throw丟擲異常物件;throw和throws的區別Java物件
- 建構函式中丟擲的異常函式
- spring2的session scope bean問題SpringSessionBean
- 高效Java:丟擲適合抽象的異常 - Kyle CarterJava抽象
- C++程式丟擲異常後執行順序C++
- angular中的scopeAngular
- WCF服務端丟擲的異常會跑到客戶端服務端客戶端
- Laravel scope用法Laravel
- migrate:rollback 時 dropForeign 丟擲的異常解決方案
- [譯] Ruby 2.6 Kernel 的system 方法增加是否丟擲異常引數。
- vue中style下scope的使用和坑Vue
- 中介軟體中丟擲異常,Handler中無法捕獲
- Golang 迴圈異常丟擲不影響整個請求Golang
- AngularJS中監視Scope變數以及外部呼叫Scope方法AngularJS變數
- 新手請教:action 中 scope="session"之後怎麼用?Session
- Python 作用域(scope) 和 LEGBPython
- 《Spring》(六)---- Bean的scopeSpringBean
- JavaScript:Scope(域)的基本指南JavaScript
- 理解nodejs模組的scopeNodeJS
- Shiro身份驗證丟擲AuthenticationException異常,解決方案Exception
- 建構函式與解構函式是否可以丟擲異常函式
- jdon安裝不知丟擲空指標的異常出現在哪 求教指標
- Laravel 框架中 使用 Symfony 提供的方法 丟擲不同型別錯誤異常Laravel框架型別
- JAVA操作MySQL tImestamp列值為0時丟擲異常的處理~JavaMySql
- 理解vue中的scope的使用Vue
- __dirname is not defined in ES module scope
- java中異常丟擲後程式碼還會繼續執行嗎Java
- 程式碼安全測試第三十期:丟擲通用異常缺陷
- Laravel 8 表單驗證丟擲異常返回 json 格式資料LaravelJSON
- Spring中的@scope註解Spring
- Laravel 模型的 scope 普通用法和全域性用法Laravel模型
- 構建自己的AngularJS(1):Scope和DigestAngularJS