请访问:https://docs.spring.io/spring-framework/reference/6.1.21/testing/testcontext-framework/ctx-management/mixed-config.html Spring Framework 测试 Spring TestContext 框架 上下文管理 Mixing XML, Groovy Scripts, and Component Classes 使用组件类进行上下文配置 使用上下文定制器的配置配置