熟悉Spring的大大们进啊

voacom 2009-09-14 09:09:07
我在配置Spring的时候,想配置两个切面
<aop:config>
<aop:pointcut id="allManageMethod"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod"/>
</aop:config>
这是其中的一个切面
我还想配置另一个切面为 * com.czccb.bmsh.service.impl.*.*(..) 该怎么配置啊,是不是就像下面这样啊
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>

这样行不行啊,还是需要别的配置方法啊,大家帮帮我啊,谢谢了
...全文
124 2 打赏 收藏 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
猿敲月下码 2009-09-14
  • 打赏
  • 举报
回复
或许可以换一种事务管理方式
EM265 2009-09-14
  • 打赏
  • 举报
回复
你上面的配置只是顺序的问题!其实你要是稍微看一下提示的话,你就明白了
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>
修改成
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>

你先这样试试看吧!
代码下载链接: https://pan.quark.cn/s/a4b39357ea24 用户账户控制(UAC)白名单的配置 Windows7环境中 UAC(User Account Control,用户帐户控制)是由微软在Windows Vista版本中推出的一项旨在增强系统安全性的创新技术,该技术强制要求用户在执行可能干扰计算机正常运作的操作或行更改会波及其他用户设置的变动前,必须提供相应的权限或管理员密码行验证。通过对这些操作启动前行授权确认,UAC能够有效阻止恶意软件及间谍软件在未获授权的状态下于计算机内行安装或实施修改。 自从Vista版本问世以来,微软便开始推行这一全新的安全机制,可视为对系统安全防护的显著提升。尽管UAC确实能够在一定程度上对某些非法程序起到防御作用,但与此同时,这一功能也给众多用户带来了诸多不便。 因此,许多用户开始探寻是否存在类似于白名单的功能,以便将那些值得信赖的程序直接赋予运行权限。事实上,这类功能确实存在,不过微软并未将其作为标准配置提供。 网络上关于此问题的绝大多数建议都是建议禁用UAC,这种说法显然缺乏针对性,因为若用户希望禁用此功能,本就不会提出相关疑问。 通过运用微软官方发布的Microsoft Application Compatibility Toolkit 5.6版本,可以将信任的程序纳入系统白名单范畴。 获取Application Compatibility Toolkit 安装程序成功后会出现三个可执行文件 以管理员身份启动Compatibility Administrator 在Custom DataBases部分创建新的数据库,并添加一个Application Fix(在下方空白处点击右键,选择...

62,620

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧