Hello, in my web project, I use Spring Framework. In UI part, there are several links for example, one button link is "Article", inside, login user can download or read online articles, another button link is "purchase", inside, user can do all the process to purchase the books.
Above is from user's point of view. Then technically speaking, when user click "article" button, Controller mapped jsp file will be loading and direct user to the Article page, eg, article.jsp. Then, according to the actions by user, application will invoke the methods in Service layer, eg. /Services/articleService.java.
The same thing for "purchase".
Now, I want my application also get the data of how long time the user is inside "article", how long time user is inside "purchase". To implement this I think I need to use AOP. But my current knowledge is, use AOP, it is easy to get the time duration about which method is invoked.For example, inside articleService.java there is a method reading(), use AOP I can get the Logging data about how much milliseconds this method is invoked.
My question is, how to get the data of how long time the user is inside "article" part without concern which particular method is invoked, without concern the time used to invoke any particular method. Please Help.


Reply With Quote
