spring学习遇到的问题汇总

来源:互联网 发布:加工中心钻孔手动编程 编辑:程序博客网 时间:2024/05/18 00:26
 1.spring注解路由方面的误解

我一直以为在web.xml中配置拦截*.action后,在注解路由的时候必须要xxxx.action。

刚才发现,访问的时候xxxx.action,然后@RequestMapping("xxxx")也可以直接访问到的。

也就是说.action这样可以不用加

 2.spring aop中正则任意匹配第一个*后空格问题

1 <aop:advisor advice-ref="txAdvice" pointcut="execution(* cn.mrf.ssm.service.impl.*.*(..))"/>

没空格报错

 3.service中整形参数用int还是integer

因为int不能判断是否为null,因此,最好都用Integer

0 0