开发者

Spring beans with database properties which are also reload-able

My question is basically is a followup question to this one, I need Spring to inject properties to bean which are loaded from DB (this is answered in the above question) another like to be able to reload these properties. So when I change property value in the DB:

How can this be done?

Thanks


Spring does not contain any built-in logic which would continuously watch your database and invoke some method when data changes (which is what you have described).

You would need to implement some logic yourself to continually poll the database, detect changes, and then re-populate the beans.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜