facebook

@SessionAttributes

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #317542 Reply

    lijamie
    Member

    The @SessionAttributes annotaion import got removed when Spring DSL generate the code. Is there a workaround?

    #317577 Reply

    jkennedy
    Member

    Sorry, in this case was the @SessionAttributes added by the DSL in the first place or did you add it in later? Which .java file is being affected.

    If the issue is that the DSL is emitting the code and is putting the @SessionAttributes annotation in place, but not adding the import for that class, we would need to potentially patch the code template that is being used.

    If you are adding the @SessionAttributes annotation and the DSL is not “merging” it correctly and dropping the imports statement, you may want to simply fully qualify the annotation like @org.springframework.web.bind.annotation.SessionAttributes

    Let me know if this work around works, or if you have that extra detail.

    Thanks,
    Jack

    #317579 Reply

    lijamie
    Member

    It was added by hand.

    How do I get SpringAnnotations view to work with my Controller class? I can’t get to display the outline even if I have selected the Controller component in the Project Explorer.

    The FQDN seems to work. Will this be fixed in the next release?

    #317627 Reply

    jkennedy
    Member

    I will add this to our Jira system, i am not sure if we can get it fixed before 9.1 is released.

    Regarding the use of the Annotator on one of the generated controllers, can you try double clicking the class name in the Open java editor for that class.

    Thanks,
    Jack

    #317719 Reply

    jkennedy
    Member

    Hello again,
    I wanted to post a more appropriate work around for you and to highlight a piece of the software that people are often unaware of…

    If you open the “navigator” view and look at the root of your project, you will see a file called .merge.xml. These are the merge rules that are used by the JET templates (see Eclipse Modeling Framework).

    You will notice a line in this file that looks like this:
    <!– This rule will sweep any stale Spring imports. –>
    <merge:sweep markup=”^org.springframework.*$” select=”Import”/>

    We had included this sweep of the Spring imports in order to keep the code clean as users turn different Spring concepts on and off through the DSL.
    If you like, you can drop that sweep in order to support your own hand code of the Spring annotations.
    Just change the line to
    <!– <merge:sweep markup=”^org.springframework.*$” select=”Import”/> –>

    Thanks,
    Jack

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: @SessionAttributes

You must be logged in to post in the forum log in