PropertyPlaceholderConfigurer

PropertyPlaceholderConfigurer

本文介绍了打印通过Spring PropertyPlaceholderConfigurer设置的所有属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在启动时打印在我们的应用程序中设置的属性的合并列表.最好的方法是什么?

I’d like to print the consolidated list of properties set in our application on startup. What is the best way to do this?

谢谢

推荐答案

使用自定义 PropertyPlaceholderConfigurer实现,该实现将覆盖resolve...方法并记录placeholder名称.您可能还需要/想要重写convert...方法,但是resolve...应该处理它.

Use a custom PropertyPlaceholderConfigurer implementation that overrides the resolve... methods and logs the placeholder name. You may also need/want to override the convert... methods, but resolve... should handle it.

这篇关于打印通过Spring PropertyPlaceholderConfigurer设置的所有属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 16:28