spring-framework 交流记录

Spring 学习笔记

Ensure MethodValidationAdapterTests pass when JVM default Locale is not English

当 JVM 默认语言不是英语时,确保 MethodValidationAdapterTests 的通过

I have addressed this in aecebf7. | 我已经在 aecebf7 中解决了这个问题。

设置语言

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
private final Locale originalLocale = Locale.getDefault();

@BeforeEach
void setDefaultLocaleToEnglish() {
    Locale.setDefault(Locale.ENGLISH);
}

@AfterEach
void resetDefaultLocale() {
    Locale.setDefault(this.originalLocale);
}

Ensure createDateTimeFormatterInOrderOfPropertyPriority test pass when openjdk version 21-ea

2 workflows awaiting approval | 2 个工作流程正在等待批准

Ensure compatibility with JDK 20 | 确保与 JDK 20 兼容

gradle/toolchains.gradle

1
jvmArgs += ['-Djava.locale.providers=COMPAT']
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus