Announcement Announcement Module
Collapse
No announcement yet.
Spring Views in STS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Views in STS

    I am having problems getting all the Views provided by STS to work correctly. I was able to configure the STS plugins to recognize the Spring XML config files in my project, so now the "Spring Explorer" view shows what I would expect it to - all of my bean definitions, @Components, @Controllers, @RequestMappings, @Autowired, Aspects, etc.

    However, that is the only view that shows anything Spring-related. The "Beans Cross Reference" and "@RequestMappings" views are empty, even though all of the @Controllers and @RequestMappings in my project are shown correctly in the "Spring Explorer" view.

    Is there anything I need to do in STS to get these other views to work correctly?

    I am using STS 2.3.1 installed from the Update Site into a working Eclipse 3.5 for Java EE installation. My project uses component scanning to find most components.

  • #2
    Beans Cross References is for showing AOP advices so if there is nothing AOP related in your code nothing is showed. Also in general it works when opening the advice then it shows which beans it applies to, or when you open a bean it shows which advices it has applied.

    For the other one I don't really know as I haven't used it...

    Comment


    • #3
      I do have one Spring aspect in my small project (a class annotated with @Aspect and @Component, using autoproxy with <aop:aspectj-autoproxy proxy-target-class="true"/>). I have seen the "advising" and "advised by" icons in the gutter of the editor when aspect and advised classes are opened.

      Since you said the BCR view applies to the open file, I tried clicking the "Link with Editor" button on the BCR view, and now the contents of this view do change when each editor is given the focus. The view now contains the information I would expect when the advice and advised classes are in the active editor.

      Maybe this "Link with Editor" requirement is obvious to an Eclipse user, but I am an IntelliJ guy who is taking a look at Eclipse SpringSource tooling to see what all the fuss is about. As such, information on how to use the STS features is very light.

      So, anyone have ideas how to make the @RequestMappings view work?

      Comment


      • #4
        Well it isn't entirely fair, sometimes the refreshing/linking works however eclipse behaves strange at times with regard to refreshing views.

        Comment


        • #5
          Hi,

          Maybe this "Link with Editor" requirement is obvious to an Eclipse user, but I am an IntelliJ guy who is taking a look at Eclipse SpringSource tooling to see what all the fuss is about.
          this is indeed far from being intuitive. Let me see if I can enable the "Link to Editor" by default.

          So, anyone have ideas how to make the @RequestMappings view work?
          To get contents to appear in the @RequestMapping view, please select config file or a config set in the Spring Explorer and right click -> Show RequestMappings.

          Let me know if that doesn't work.

          Christian

          Comment


          • #6
            Christian, this issue came (and maybe still comes) up on trainings also, so enabling it by default would be an improvement. Although I doubt it will solve it completly, I happen to have some weird refreshing issues with eclipse regarding views, sometimes it appears changes aren't picked up.

            I'll see if I can come up with some testcase, but I guess that that situation is more or less an eclipse issue then an STS issue.

            Comment

            Working...
            X