org.springframework.core.env.Environment 似乎有一个 getProperty 方法,但没有什么可以迭代所有属性。这是故意的吗?
最佳答案
是的,是 intentional .
The PropertyResolver interface and PropertySource class are intentionally limited in this respect so that they can be backed by providers that might not have the ability to iterate keys.
关于spring - 如何迭代并打印 Spring 环境对象的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19526318/