Hi,
   For what it's worth, I use @SpringBean to inject service layer beans into
actions. I'll usually put the @SpringBean annotation on a private base
action bean class member variable.  This works perfectly fine for me and
I've never seen a reason to even look into doing it any other way. I know
there have some discussions in the past suggesting it might be better if
standard annotations were used. Personally,  I've never considered that
enough of an issue to loose sleep over.

Inside my server layer,  I make heavy use of @Component,
@Service,@Repository to mark beans that spring should instantiate
automatically. I then use @Autowired to handle most of the wiring.

If you use these annotations then you don't need very much XML in the spring
configuration files. You just have to specify what packages to scan for
classes marked with those annotations and spring takes care of creating
everything and wiring it together.

There are a few cases where you DO need to define the bean entirely w/XML.
One that jumps to mind is cases where you have values in standard java
property files that get injected into bean properties. However, Spring 3.0
has some kind of expression language meant to deal with that as well.


On Mon, Jun 8, 2009 at 10:58 AM, DaveMark <djdavem...@yahoo.co.uk> wrote:

>
> Hi Richard,
>
> > Whats your experience using Spring?
>
> I'm no expert since it's always the architects who put everything in place.
> But I'm working to change that!
>
> > What I don't like at Spring is that you
> > have to bind every bean that you want to
> > inject. I also don't like the XML file
> > cause of refactoring and usability (auto
> > completition) problems.
>
> I'm sure Spring has a way to auto detect (through annotations?) the beans
> you want to inject but I'm not sure how this would work with injecting the
> Service layer into Stripes. As a start it would be great to declare only the
> Service layer beans so the stripes @SpringBean works like it does, then have
> the DAO layer auto-discovered and injected into the relavent Service layer
> beans.
>
> > I use guice instead of Spring.
>
> Slowly but surely I'm showing the architects in my company that they should
> be using Stripes. Once I get them onboard, I'll work on getting other stuff
> accepted.
>
> Cheers,
>
> DJDaveMark
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _
>
>
>
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
Ross Sargant
Software Engineer
p: 954-571-2017 x2108
email: rsarg...@tvrc.com

TVR Communications LLC
3275 W Hillsboro Blvd,Suite 300,Deerfield Beach, Florida,33442

http://www.tvrc.com
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to