简体   繁体   English

修改 PropertyPlaceholderConfigurer 的属性

[英]Modify property of PropertyPlaceholderConfigurer

I have a class that extends PropertyPlaceholderConfigurer where I´m injecting some properties with values form database.我有一个扩展 PropertyPlaceholderConfigurer 的类,我在其中注入了一些带有值表单数据库的属性。 My question is, if once that I have my application spring running, would be possible to update a property value that I have on memory on PropertyPlaceholderConfigurer.我的问题是,如果一旦我的应用程序 spring 运行,就可以更新我在 PropertyPlaceholderConfigurer 上的内存中的属性值。

Regards.问候。

Have you tried to refresh your Application Context and get the new bean? 您是否尝试刷新应用程序上下文并获取新bean?

check out the post on Update database settings in properties file in Spring 查看Spring中属性文件中的更新数据库设置的帖子

我认为这篇博文完全描述了你需要的东西: spring中属性的修改 - propertyplaceholderconfigurer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PropertyPlaceholderConfigurer类中的locations属性 - locations property in PropertyPlaceholderConfigurer class 在PropertyPlaceholderConfigurer中使用的系统属性后缀 - System property suffix for use in PropertyPlaceholderConfigurer PropertyPlaceholderConfigurer,用于读取属性文件和数据库 - PropertyPlaceholderConfigurer for reading property files and database 在PropertyPlaceholderConfigurer管理的属性文件中允许$字符 - Allowing $ character in a property file managed by PropertyPlaceholderConfigurer 无法使用PropertyPlaceholderConfigurer在JNDI上下文中找到属性 - Unable to find property in JNDI context using PropertyPlaceholderConfigurer 春天的多种特性。 PropertyPlaceholderConfigurer类中的属性 - multiple properties in spring. property in PropertyPlaceholderConfigurer class 不使用PropertyPlaceholderConfigurer加载属性文件 - Load a property file without using PropertyPlaceholderConfigurer 结合使用context:property-override和PropertyPlaceholderConfigurer - Combinating context:property-override and PropertyPlaceholderConfigurer 春季:PropertyPlaceHolderConfigurer递增整数中缀属性名称 - Spring: PropertyPlaceHolderConfigurer incrementing integer infix property name 如何在JSP中使用PropertyPlaceholderConfigurer中指定的属性文件中的属性 - How to use property from property file specified in PropertyPlaceholderConfigurer in JSP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM