-
Aug 9th, 2012, 03:15 AM
#1
Can prototype beans be defined using Java based configuration ?
Simple question, can it be done ?
Normally with Java based Spring configuration a method defined with @bean returns a new instance of the bean in question, but a prototype bean is different as it's effectively a template for an object rather than something that returns the actual object.
Last edited by Paul Newport; Aug 9th, 2012 at 03:42 AM.
-
Aug 9th, 2012, 07:56 AM
#2
Yes... The java methods for java config are basically factory methods simply use the @Scope to define it as prototype.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules