0
會話代理豆,我有我的會話bean這樣的:獲取JSP
@Component
@Scope(value="session", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class MySession { ... }
的問題是我怎麼可以訪問這個bean在我的jsp?
我已經顯示會話數據在我的JSP和我得到這個:
org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget.mySession
scopedTarget.mySession
所以我儘量${scopedTarget.mySession.qualites}
,但沒有奏效。
謝謝@jhadesdev不,我不想公開每一個我擁有的豆。 – Youssef
在這種情況下,@ModelAttribute允許揭露beans selectivelly –
不,但我想用'@Component @Scope(value =「session」,proxyMode = ScopedProxyMode.TARGET_CLASS)'我認爲只是somthing丟失,因爲我讀這是一些在會話中存儲數據的方式? – Youssef