Dynamic creation of beans in Spring

后端 未结 3 1354
面向向阳花
面向向阳花 2020-12-21 18:45

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????

3条回答
  •  攒了一身酷
    2020-12-21 19:24

    You might want to think about this a little more. Even if you made your fields totally configurable, you will still have to write the code that accesses them. And given that you are going to have to write code anyway, might as well keep everything in code. It's much simpler that way.

提交回复
热议问题