当前位置:首页 > 开发 > 编程语言 > 编程 > 正文

Today’s feeling about write an interceptor

发表于: 2009-04-18   作者:asialee   来源:转载   浏览:
摘要:      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
     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.

Today’s feeling about write an interceptor

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号