Take the 2-minute tour ×

I'm developing bunch of relatively small Spring based java web-application. I'm mostly using annotations to create controllers and components. What's the best way to configure such application?

I'm writing my own "configuration beans" that are just value beans with needed fields and @autowire them into other beans

this way my config.xml contains of "just" component-scan and definition of config-beans (2-3 per app)

Is this good approach?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

There is nothing wrong with this approach. Folks prefer it this way. So, go with it, I would say.

share|improve this answer
add comment

Your Answer


