Today’s feeling about write an interceptor

[size=large] Every day out teacher will give us a topic to write something we like, but in the weekend the time is belongs to us, and in the past, I usually don’t write the English journal, in order to form a good habit in the future, I plan to write some journals in the weekend, just like the habit I running at night.
Last weekend I’m learning the struts2, and there is an important definition called the Interceptor, and they will be executed before or after the Action’s execute method is executed. This is an AOP programming mind, just like OOP. And today I want to implement an function to implement record the site access record. This is not very difficult to implement using Java Filter, but I want to use the newly learned interceptor to implement this.
It’s same very easy to implement that. I’m using Struts2 and Spring to implement that, and configure the interceptor in the struts2’s configuration file, but It has caused a lot of error, and some error is I never encounter. In the past I have used interceptor many times, but I often copy the other person’s code. And never programming it by myself, may be lack of deeply thinking.
In the future I will combine the practice with the theory, and in the past I feel I lack of practicing. Just review the other person’s code and some open source project’s code. And I hope I can form a good habit to practice more.
[/size]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值