Spring v6.0.12 发布

⭐ 新特性

  • ArithmeticException:在 @Scheduled(fixedDelay = Long.MAX_VALUE, timeUnit = TimeUnit.MINUTES) 上 long 溢出 #31210
  • RequestResponseBodyMethodProcessor 中的 resolveArgument 方法进行优化 #31175
  • 更新 BeanValidationBeanRegistrationAotProcessor 中 validation exception 的日志级别 #31147
  • 跳过在 PathMatchingResourcePatternResolver 中搜索不存在的目录。#31111
  • Argument[Type]PreparedStatementSetterdoSetValue() 中为 argValue 添加 @Nullable #31086
  • 优化 StringUtils 中的 whitespace 检查 #31067
  • 使用 simple JPARepository 时缺少代理提示 #31050
  • ReactiveAdapterRegistry 中的现有 adapter 注册 override #31047
  • DefaultListableBeanFactory#getBeanNamesForType 在解析 FactoryBean 时未考虑目标类型 #30987
  • spring-core 访问 org.jboss.vfs,以便在 WildFly 上支持 VfsUtils #30973
  • contentLength 可用时,在 StringHttpMessageConverter 中使用 readNBytes #30942
  • 当数组长度不大于 1 时,跳过数组排序 #30934
  • 避免对每个 SseEventBuilder 条目进行刷新 #30912
  • 使用 protected 修饰 DefaultGenerationContext(DefaultGenerationContext, String) 构造函数 #30895
  • 在 Spring MVC 中的 AbstractResourceResolver 子类中添加缺失的 @Nullable 注解 #30893
  • 创建 scope Bean 实例时的性能瓶颈 #30883
  • 对同一 Bean 类中的多个 @Autowired 方法进行确定性的 Bean 初始化 #30359
  • 优化 ClassUtils#getMostSpecificMethod #30272
  • Hibernate native 查询代理缺少 native 提示 #29603
  • 检查异常原因以支持 @PropertySource(ignoreResourceNotFound) #22276
  • 调整 PayloadMethodArgumentResolver 中的验证元数据处理方式 #21852

🐞 Bug 修复

  • Spring Boot 启动失败 does not reside in the file system: manifoldclass://622488023/.../ #31216
  • WebClientResponseException.getResponseBodyAs 抛出异常,而不是返 empty body 的 null #31179
  • 未完全清除注解缓存可能导致类加载器泄漏 #31170
  • Spring LogFactory 实现在抽象方法声明方面背离了原始 Apache LogFactory #31166
  • Graalvm 原生镜像功能 PreComputeFieldFeature 禁用所有 netty native transport #31141
  • 由于 nullSafeConciseToString()Map/Collection 代理上调用 isEmpty() 导致 Bean 注入失败 #31138
  • R2DBC:与现有事务嵌套后跳过释放连接 #31133
  • SpelExpressionParser 对无效表达式抛出 IllegalStateException 而不是 ParseException #31097
  • @Nested 测试类中的 @DynamicPropertySource 不能覆盖外层类的动态属性 #31083
  • Spring Boot WebFlux 对无效输入进行验证 #31045
  • TransactionalApplicationListenerMethodAdapter 应在目标类方法上找到 @TransactionalEventListener #31034
  • ScheduledAnnotationBeanPostProcessor:优雅停机不应中断当前正在运行的 Job #31019
  • 在使用 Hibernate 6 的自定义类型中未调用 TypeBootstrapContext 构造函数#30924
  • 在特殊桥接方法的情况下,MethodIntrospector.selectMethods(?) 无法找到方法 #30906
  • Spring webflux @ModelAttribute 注解方法无法与 kotlin suspend 方法一起使用 #30894
  • 支持 Kotlin 序列化自定义 serializer #30870
  • 如果重复使用 feature name 前缀,则测试 AOT 处理失败 #30861
  • NoUniqueBeanDefinitionException 应确保 beansNameFound 是可序列化的 #29753
  • JDK 11/17 上的 java.beans.Introspector 中的 ClassInfo 缓存导致 Permgen 内存泄漏 #27781
  • Model.set() Kotlin 扩展方法不允许使用 null 值 #27115
  • 允许 PropertySourcesPlaceholderConfigurer 子类自定义 PropertyResolver #26761

更多详情请参阅 https://github.com/spring-projects/spring-framework/releases/tag/v6.0.12