Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Running annotation-based bean configuration from Eclipse Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running annotation-based bean configuration from Eclipse

    There's something strange occuring in my project (Eclipse RCP application, Spring 3, Spring DM 2.0.0.M1):

    I want to configure my beans using @Service, @Component, etc on my beans.
    When I export my product and run it, those beans get instantiated by Spring DM. But when I run the same project from within Eclipse, the component scan doesn't seem to pick them up.

    Exporting the whole application every time I change something would make development and testing very awkward, so I wanted to know if maybe someone else has had the same issue?
    Somewhere I stumbled upon a post (which I can't find anymore) that suggested adding a directory called 'target' to the bundles classpath, but that didn't work for me.

    Best regards
    Marcus

  • #2
    Update: I found the solution.
    Adding the line
    Code:
    Bundle-ClassPath: .,bin
    to the bundle manifest indeed does the trick. After finding the post I mentioned earlier again, I understood that it referenced a Maven-style project structure. Since a standard Eclipse plugin has its binary folder simply named 'bin', putting this in the classpath does the trick.

    It's however still a bit strange that the bin folder isn't on the classpath by default. I'd have imagined that this would cause a lot more troubles.

    Comment

    Working...
    X