| Author |
Dynamic bean creation in Spring
|
saakshi jain
Greenhorn
Joined: Sep 26, 2011
Posts: 10
|
|
Hi ,
Is there a way in spring wherein we can read the fields of a bean from the DB table and create a complete bean class - with getters and setters on server startup???
I require this to make my application completely configurable...as in if I have to add a new field in future , all I would require would be adding a field in the db and the bean setters and getters would be available to me.
Thanks
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
|
Better sit in the Spring forum. Moving...
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
Saifuddin Merchant
Ranch Hand
Joined: Feb 08, 2009
Posts: 576
|
|
Nothing in Spring that I know off provides this functionality off the shelf.
Creating a class dynamically at run time ... I pretty sure that's been tried a few times. Reflection could work - but it won't be pretty
google - creating a class dynamically in java
and this post on the Ranch - http://www.coderanch.com/t/385084/java/java/creating-simple-java-objects-dynamically
|
Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
|
 |
 |
|
|
subject: Dynamic bean creation in Spring
|
|
|