20220507 Appendix

前言

文档地址

参考文档的这一部分涵盖了应用于核心 Spring 框架中的多个模块的主题。

Spring Properties

SpringProperties 是控制 Spring 框架某些底层方面的属性的静态容器。用户可以通过 JVM 系统属性配置这些属性,也可以通过 SpringProperties.setProperty(String key, String value) 方法以编程方式配置这些属性。如果部署环境不允许自定义 JVM 系统属性,则后者可能是必要的。作为替代,这些属性可以配置在类路径根目录中的 spring.properties 文件中,例如,部署在应用程序的 JAR 文件中。

下表列出了当前支持的所有 Spring Properties

Name 描述
spring.beaninfo.ignore 指示 Spring 在调用 JavaBeans Introspector 时使用 Introspector.IGNORE_ALL_BEANINFO 模式
spring.expression.compiler.mode Spring 表达式语言 编译表达式时使用的模式
spring.getenv.ignore 如果 Spring Environment 属性 (例如,配置字符串中的占位符) 不能解析,则指示 Spring 忽略操作系统环境变量。详细信息请参见 AbstractEnvironment
spring.index.ignore 指示 Spring 忽略位于 META-INF/spring.components 中的组件索引,参见 Generating an Index of Candidate Components
spring.jdbc.getParameterType.ignore 指示 Spring 完全忽略 java.sql.ParameterMetaData.getParameterType ,参见 Batch Operations with a List of Objects
spring.jndi.ignore 指示 Spring 忽略缺省的 JNDI 环境,作为一种优化,用于从一开始就找不到任何此类 JNDI 回退搜索的场景,从而避免重复的 JNDI 查找开销。详情请参阅 JndiLocatorDelegate
spring.objenesis.ignore 指示 Spring 忽略 Objenesis,甚至不尝试使用它。参见 SpringObjenesis
spring.test.constructor.autowire.mode 如果测试类中没有 @TestConstructor ,则使用默认测试构造函数自动装配模式。请参阅 Changing the default test constructor autowire mode
spring.test.context.cache.maxSize Spring TestContext Framework 中上下文缓存的最大大小。参见 Context Caching
spring.test.enclosing.configuration 如果测试类中没有 @NestedTestConfiguration ,则使用默认的封闭配置继承模式。请参阅 Changing the default enclosing configuration inheritance mode
posted @ 2022-06-09 21:33  流星<。)#)))≦  阅读(50)  评论(0编辑  收藏  举报