Externalizing the spring configuration

I was reading folowing lines and I did not understand clearly.
Externalizing the configuration
For the most part, it is possible to configure your entire application in a single
bean wiring file. But sometimes you may find it beneficial to extract certain pieces
of that configuration into a separate property file. For example, a configuration
concern that is common to many applications is configuring a data source. In
Spring, you could configure a data source with the following XML in the bean wiring
file


Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
LVL 7
gudii9Asked:
Who is Participating?
 
objectsCommented:
its simply saying you don't want to put all your spring configuration into one file
spring allows you to use as many files as you want
so for example you can put security in one file, database access into another and your web interface config in another
0
 
for_yanCommented:
A very good explanation fof that statement with good examples comes right after that
statement in that very book:
http://translated.by/you/spring-in-action-second-edition-part-1-core-spring/original/?page=33

It is just convenient to have certain pieces of configuration of your application in
seprate files because they may be dependent not so much on business
logic of your application but rather on deployment. So you mostly
configure those parts which are indeed appliaction specific in your bean-wiring file.
Those parts which are deployment specific, like database source,  makes sense to keep separate.

And they also show how technically connect your main configuration (bean-wiring) file
with those files with deployemnt specific pieces  by using propertyConfigurer bean and
an example with jdbc.properties file. Just read all that below in section 3.5.3 of the
book which you are reading. This seems to be very strightforward and understandable stuiff.


0
 
Sathish David Kumar NArchitectCommented:
>>>>>>
as per my understanding .. if you going to use ur application archi like this

Controller -------> services ---------> DAO

so here you no need to create all wiring in single file you can use  3 diffrent xml file for wiring .
0
 
capri9Commented:
its good
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.