Using spring AOP to get the idea of a session

Source: Internet
Author: User

Because spring's AOP-oriented programming is not related to the servlet container, it is cumbersome to get session sessions. Of course Struts2 also does not rely on the servlet container, can be used in spring AOP can use Com.opensymphony.xwork2.ActionContext, you can get session. However, in a servlet or STRUTS1, the session can be saved by threadlocal Way, and the session object is obtained in Spring AOP. Specific ideas and code:  This is the class that holds the request and session/** *  * @author Zhuzhou jian kun beida Jade Bird Zhou  * */public class syscontent {      private static threadlocal

The idea of using spring AOP to get a session

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.