spring的AOP配置问题

川籍黑人 2008-11-13 02:31:43
报的是404错误

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd ">

<bean name="/login" class="com.maesinfo.action.UserLevelAction">
<property name="userservice">
<ref bean="userservice" />
</property>
</bean>
<bean id="userservice"
class="com.maesinfo.service.UserServiceImpl">
<property name="userleveldao">
<ref bean="userleveldao" />
</property>
<property name="userdao">
<ref bean="userdao" />
</property>
</bean>
<bean id="userleveldao" class="com.maesinfo.dao.UserlevelDAO" />
<bean id="userdao" class="com.maesinfo.dao.UserDAO" />

<bean id="checkUser" class="com.maesinfo.util.CheckUserLevel" />

<aop:config>
<aop:aspect id="checkuser" ref="checkUser">
<aop:pointcut id="allcheckmothod" expression="exection(* com.maesinfo.service.check*(..))"/>
<aop:before method="checkLevel" pointcut-ref="allcheckmothod"/>
</aop:aspect>
</aop:config>
</beans>

上面是Spring的配置文件
如果不加上AOP的那段代码就不会出问题,代码如下:
<bean id="checkUser" class="com.maesinfo.util.CheckUserLevel" />

<aop:config>
<aop:aspect id="checkuser" ref="checkUser">
<aop:pointcut id="allcheckmothod" expression="exection(* com.maesinfo.service.check*(..))"/>
<aop:before method="checkLevel" pointcut-ref="allcheckmothod"/>
</aop:aspect>
</aop:config>

会的帮忙解决一下,谢谢了!
...全文
222 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ouyangxiaokang6 2008-11-13
  • 打赏
  • 举报
回复
还是检查你的web.xml和strutsconfig吧
bruni 2008-11-13
  • 打赏
  • 举报
回复
是你访问的url找不到制定网页
和spring无关
_______-- 2008-11-13
  • 打赏
  • 举报
回复
404?事务处理应该在后台吧,和404应该搭不上边吧。。。
不知道,帮你顶。

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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