Announcement Announcement Module
Collapse
No announcement yet.
Adding dependency injection to JAX-B bean? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding dependency injection to JAX-B bean?

    I need an object created with JAX B binding to have a bean from Spring injected into it. For instance, something like this...

    Code:
    @XmlRootElement
    public class User {
    
        @XmlElement  public String someData;
        @Autowired  private SomeClass springBean; 
    }
    Does anyone know if there is a platform or plugin anywhere that allows this?

  • #2
    You can achieve this in Spring by using the @Configurable annotation with AspectJ. Check out the Spring reference documentation for more details.

    Comment

    Working...
    X