spring的一個異常原因

java.lang.IllegalAccessException

關鍵字: struts2 + ext2.2 + spring

Servlet.service() for servlet default threw exception
java.lang.IllegalAccessException: Class com.googlecode.jsonplugin.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public"


需要用到get方法,只是在action裏面不能包含有接口的get方法,
private InterfaceService iService;
public InterfaceService getIService(){
return iService;
}
即:spring注入時,不需寫get方法

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章