Results 1 to 2 of 2

Thread: Spring MVC- Getting error when I try to use proxyMode=ScopedProxyMode.TARGET_CLASS

  1. #1

    Post Spring MVC- Getting error when I try to use proxyMode=ScopedProxyMode.TARGET_CLASS

    Hello all,

    I am using Spring 3.1

    Now, as per this website--> http://tedyoung.me/2011/10/19/practi...rt-5-sessions/
    I can use the following annotations for a Global Session scoped class..

    Code:
    @Component
    @Scope(value="session", proxyMode=ScopedProxyMode.TARGET_CLASS)
    public class UserPreferences {
    ....remaining code....
    However, in my Java class, when I use the above annotations, I am getting this error in Eclipse IDE-->

    ScopedProxyMode cannot be resolved to a variable
    What am I doing wrong here? I basically want to use a specific object across global session - viz, across multiple controllers in my Spring MVC based web app.

    Thanks,
    Arvind.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Import the class... Jduging from the error you just sloppy pasted it without resolving the imports...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •