首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

Spring AOP 入门范例

2012-08-24 
Spring AOP 入门实例以Struts2+Spring为例,要求必须在登录之后才能实现某一链接。如果未登录则抛出异常,跳

Spring AOP 入门实例

以Struts2+Spring为例,要求必须在登录之后才能实现某一链接。如果未登录则抛出异常,跳转到异常页面。

假设链接为:http://localhost:8080/aop/test.action

Struts2的配置文件struts.xml文件:

?Spring AOP 入门范例



Spring中的TestAction配置:

?Spring AOP 入门范例?Spring AOP 入门范例??Spring AOP 入门范例?
    <error-page> ???????<exception-type>exception.NoLoginException</exception-type> ???????<location>/error.jsp</location> ??</error-page>??
1 楼 Roshan2 2011-09-30   http://lijiejava.iteye.com/blog/1180331

热点排行