spring - 如何迭代并打印 Spring 环境对象的属性

标签 spring

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/

相关文章:

java - 未找到引用的 bean 'name'

java - 限制从 bean 定义注入(inject),而不是从 Autowiring 端注入(inject)(bean 不可隐式注入(inject))

java - Spring - Bean 没有被注入(inject)

Spring Boot 嵌入式 tomcat 的行为与独立行为不同

java - 当我尝试在 Spring 中下载 CSV 时获得 CPU 100%

java - Spring:根据 View 重定向

java - Spring Cucumber Serenity 的 Autowiring 步骤

java - 有关 Spring 转换器以及 Jaxb2RootElementHttpMessageConverter 如何在 Spring MVC 中工作的一些信息

java - JpaRepositories 的 UnsatisfiedDependencyException

java - Spring-Batch 没有将元数据持久化到数据库?