Author
Databaseconnection
mike molin
Greenhorn
Joined: Nov 11, 2010
Posts: 14
Hi !
How do you establish a database connection using spring mvc ?
where and how does the configuration look like ?
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 16624
posted Apr 21, 2011 17:56:21
0
mike molin wrote: Hi !
How do you establish a database connection using spring mvc ?
where and how does the configuration look like ?
In a Spring Application you usually define a datasource through xml Spring configuration like
Mark
Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 16624
posted Apr 21, 2011 18:05:29
0
Now the package for that class might be wrong, or you might be using an implementation of a Datasource provided by a database vendor and you might have other properties to set, but that is now a bean you can inject into any class that needs it.
Mark
subject: Databaseconnection