@Configurable couple tightly domain object with Spring. Means that domain object can not relocate to other solutions. Is this a good practice?
Please let me know your thought.
@Configurable couple tightly domain object with Spring. Means that domain object can not relocate to other solutions. Is this a good practice?
Please let me know your thought.
Annotation is just one way for identifying the injection. The other choice is to write an AspectJ pointcut expression, which is as well offerred by Spring 2.0. If u do not like annotations, then u can very well use an abstract aspect to provide your own pointcut definitions. Spring 2.0 comes bundled with an aspect jar (from AspectJ), spring-aspects.jar, which provides a base class AbstractBeanConfigurerAspect. Using this, u you can write an aspect to configure all instances of objects defined in the domain model using prototypical bean definitions that match the fully-qualified class names. Please refer to Section 7.7.2 of the Spring Reference Documentation for an example. Find more of this here and the comments section of this blog entry.Originally Posted by nielinjie
Thanks.
- Debasish