You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Baptiste Autin (JIRA)" <ji...@apache.org> on 2010/06/16 11:42:24 UTC
[jira] Commented: (TAP5-627) Allow injection of named spring beans
[ https://issues.apache.org/jira/browse/TAP5-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879292#action_12879292 ]
Baptiste Autin commented on TAP5-627:
-------------------------------------
+1
Several beans of the same type in the same container is a frequent situation (for instance when you have a DAO class that inherits from another one)
IMHO, injecting the ApplicationContext and calling getBean() is not a reasonable option. For good reasons, Spring users dislike injecting the ApplicationContext, and so supporting named spring beans would be *really* great.
(and instead of inventing a new annotation to do this, why not supporting the JSR 250 @Resource ?)
> Allow injection of named spring beans
> -------------------------------------
>
> Key: TAP5-627
> URL: https://issues.apache.org/jira/browse/TAP5-627
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-spring
> Affects Versions: 5.1.0.2
> Reporter: Paul Field
>
> Since 5.1 now handles Spring beans through the master object provider, it is (I think) impossible to specify spring beans by name, which is a pain when you have multiple spring beans implementing the same interface.
> Could the Spring Object Provider take notice of an annotation that specifies the bean name, please? (e.g. @Service or @Id)
> It would be particularly nice if the same annotation specified the names of Tapestry IOC services *and* spring beans, so that if we decide to move services from Spring into Tapestry IOC we don't need to change any other code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.