Could not find class [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration]

该文章已生成可运行项目,

1、缘由。

今天尝试springboot4.0.0-snapshot 版本时,尝试他的版本控制功能。

上午启动还好好的,下午就报错:

2、报错信息:

java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration]
    at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:353) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:451) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:384) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:273) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:191) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:143) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:110) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.registerBeanDefinitionForImportedConfigurationClass(ConfigurationClassBeanDefinitionReader.java:167) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:147) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:126) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:446) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:306) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:781) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:599) ~[spring-context-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-web-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) ~[spring-boot-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) ~[spring-boot-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1344) ~[spring-boot-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1333) ~[spring-boot-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at com.nextera.boot4.Boot4Application.main(Boot4Application.java:15) ~[classes/:na]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) ~[spring-boot-devtools-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:534) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:513) ~[na:na]
    at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:121) ~[spring-boot-devtools-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:534) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:513) ~[na:na]
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:302) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:343) ~[spring-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
    ... 25 common frames omitted


Process finished with exit code 0


3、分析:

查了一下:

真正的WebMVC配置由 org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration 提供。 

4、 解决方法:

手动创建假的包结构和文件。

在 src/main/java/org/springframework/boot/autoconfigure/web/servlet 目录下,创建

文件: 

WebMvcAutoConfiguration.java 

内容如下:

@Configuration
@ConditionalOnMissingBean(name = "webMvcAutoConfiguration")
public class WebMvcAutoConfiguration {

    // 这是一个空的占位符类,只用于解决硬编码类引用问题
    // 真正的WebMVC配置由 org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration 提供

}

启动又报错:

java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration]

5. 如法炮制:

在src/main/java/org/springframework/boot/autoconfigure/orm/jpa 目录下,创建

HibernateJpaAutoConfiguration.java 文件, 内容如下:
@Configuration
@ConditionalOnMissingBean(name = "hibernateJpaAutoConfiguration")
public class HibernateJpaAutoConfiguration {

    // 这是一个空的占位符类,只用于解决硬编码类引用问题
    // 真正的JPA配置由Spring Boot 4.0的新模块化架构提供

}

6、至此,启动成功。

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::       (v4.0.0-SNAPSHOT)

2025-07-02T17:32:28.757+08:00  INFO 21936 --- [boot4] [  restartedMain] [                                                 ] com.nextera.boot4.Boot4Application       : Starting Boot4Application using Java 21.0.5 with PID 21936 (D:\practice\springDeepSearch\boot4\target\classes started by wen in D:\practice\springDeepSearch\boot4)
2025-07-02T17:32:28.766+08:00  INFO 21936 --- [boot4] [  restartedMain] [                                                 ] com.nextera.boot4.Boot4Application       : The following 1 profile is active: "local"
2025-07-02T17:32:33.121+08:00  WARN 21936 --- [boot4] [  restartedMain] [                                                 ] r$InitializeUserDetailsManagerConfigurer : Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. If the current configuration is intentional, to turn off this warning, increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR
2025-07-02T17:32:35.102+08:00  INFO 21936 --- [boot4] [  restartedMain] [                                                 ] com.nextera.boot4.Boot4Application       : Started Boot4Application in 6.968 seconds (process running for 8.56)

有时候不要轻易添加新的代码,尝试新功能,现在终于理解了为什么windows 系统有安全配置,最后一次正确配置了。如果Idea 有这个功能就好了。

本文章已经生成可运行项目
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@323ebcc6] 2025-08-28 10:06:27.938 DEBUG 24804 --- [ main] o.s.a.aspectj.AspectJExpressionPointcut : Could not access current invocation - matching with limited context: java.lang.IllegalStateException: No MethodInvocation found: Check that an AOP invocation is in progress and that the ExposeInvocationInterceptor is upfront in the interceptor chain. Specifically, note that advices with order HIGHEST_PRECEDENCE will execute before ExposeInvocationInterceptor! In addition, ExposeInvocationInterceptor and ExposeInvocationInterceptor.currentInvocation() must be invoked from the same thread. 2025-08-28 10:06:27.943 DEBUG 24804 --- [ main] c.d.datasource.aspect.DataSourceAspect : Set datasource to: tdengine 2025-08-28 10:06:27.947 DEBUG 24804 --- [ main] c.d.datasource.aspect.DataSourceAspect : Restored datasource to: default 2025-08-28 10:06:27.948 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.948 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 6, missCount = 1] 2025-08-28 10:06:27.950 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.951 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 7, missCount = 1] 2025-08-28 10:06:27.951 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.951 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 8, missCount = 1] 2025-08-28 10:06:27.952 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.952 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 9, missCount = 1] 2025-08-28 10:06:27.955 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.955 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 10, missCount = 1] 2025-08-28 10:06:27.957 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.957 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 11, missCount = 1] 2025-08-28 10:06:27.958 DEBUG 24804 --- [ main] tractDirtiesContextTestExecutionListener : After test method: context [DefaultTestContext@4758820d testClass = SyncBmsDataTestServicess, testInstance = com.depower.SyncBmsDataTestServicess@6362dcf2, testMethod = syncDataTest@SyncBmsDataTestServicess, testException = java.lang.NullPointerException, mergedContextConfiguration = [WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true]], class annotated with @DirtiesContext [false] with mode [null], method annotated with @DirtiesContext [false] with mode [null]. 2025-08-28 10:06:27.958 DEBUG 24804 --- [ main] o.s.t.c.w.ServletTestExecutionListener : Resetting RequestContextHolder for test context [DefaultTestContext@4758820d testClass = SyncBmsDataTestServicess, testInstance = com.depower.SyncBmsDataTestServicess@6362dcf2, testMethod = syncDataTest@SyncBmsDataTestServicess, testException = java.lang.NullPointerException, mergedContextConfiguration = [WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true]]. 2025-08-28 10:06:27.965 DEBUG 24804 --- [ main] c.DefaultCacheAwareContextLoaderDelegate : Retrieved ApplicationContext [8996952] from cache with key [[WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]]] 2025-08-28 10:06:27.965 DEBUG 24804 --- [ main] org.springframework.test.context.cache : Spring test ApplicationContext cache statistics: [DefaultContextCache@41058886 size = 1, maxSize = 32, parentContextCount = 0, hitCount = 12, missCount = 1] 2025-08-28 10:06:27.965 DEBUG 24804 --- [ main] tractDirtiesContextTestExecutionListener : After test class: context [DefaultTestContext@4758820d testClass = SyncBmsDataTestServicess, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@74eb909f testClass = SyncBmsDataTestServicess, locations = '{}', classes = '{class com.depower.DepowerApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@313b2ea6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@623a8092, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@157853da, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@306cf3ea], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.support.DependencyInjectionTestExecutionListener.reinjectDependencies' -> true]], class annotated with @DirtiesContext [false] with mode [null]. 2025-08-28 10:06:27.972 DEBUG 24804 --- [extShutdownHook] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647 2025-08-28 10:06:27.972 DEBUG 24804 --- [extShutdownHook] o.s.c.support.DefaultLifecycleProcessor : Bean 'documentationPluginsBootstrapper' completed its stop procedure 2025-08-28 10:06:27.974 INFO 24804 --- [extShutdownHook] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' 2025-08-28 10:06:27.975 DEBUG 24804 --- [extShutdownHook] o.s.d.r.l.RedisMessageListenerContainer : Stopped RedisMessageListenerContainer 2025-08-28 10:06:27.975 INFO 24804 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 2025-08-28 10:06:27.980 INFO 24804 --- [extShutdownHook] o.s.s.quartz.SchedulerFactoryBean : Shutting down Quartz Scheduler 2025-08-28 10:06:27.980 INFO 24804 --- [extShutdownHook] org.quartz.core.QuartzScheduler : Scheduler DepowerScheduler_$_D213791756346770213 shutting down. 2025-08-28 10:06:27.980 INFO 24804 --- [extShutdownHook] org.quartz.core.QuartzScheduler : Scheduler DepowerScheduler_$_D213791756346770213 paused. 2025-08-28 10:06:27.981 DEBUG 24804 --- [extShutdownHook] org.quartz.simpl.SimpleThreadPool : Shutting down threadpool... 2025-08-28 10:06:27.981 DEBUG 24804 --- [extShutdownHook] org.quartz.simpl.SimpleThreadPool : Shutdown of threadpool complete. 2025-08-28 10:06:27.981 DEBUG 24804 --- [extShutdownHook] o.s.s.quartz.LocalDataSourceJobStore : JobStore background threads shutdown. 2025-08-28 10:06:27.981 INFO 24804 --- [extShutdownHook] org.quartz.core.QuartzScheduler : Scheduler DepowerScheduler_$_D213791756346770213 shutdown complete. 2025-08-28 10:06:27.987 DEBUG 24804 --- [extShutdownHook] io.lettuce.core.RedisClient : Initiate shutdown (100, 100, MILLISECONDS) 2025-08-28 10:06:27.995 DEBUG 24804 --- [extShutdownHook] i.l.c.resource.DefaultClientResources : Initiate shutdown (0, 2, SECONDS) 2025-08-28 10:06:27.996 DEBUG 24804 --- [extShutdownHook] i.l.c.r.DefaultEventLoopGroupProvider : Initiate shutdown (0, 2, SECONDS) 2025-08-28 10:06:28.005 DEBUG 24804 --- [extShutdownHook] o.a.s.spring.LifecycleBeanPostProcessor : Destroying bean [securityManager]... 2025-08-28 10:06:28.015 DEBUG 24804 --- [eduler_Worker-5] org.quartz.simpl.SimpleThreadPool : WorkerThread is shut down. 2025-08-28 10:06:28.015 DEBUG 24804 --- [eduler_Worker-3] org.quartz.simpl.SimpleThreadPool : WorkerThread is shut down. 2025-08-28 10:06:28.015 DEBUG 24804 --- [eduler_Worker-7] org.quartz.simpl.SimpleThreadPool : WorkerThread is shut down.
08-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

nextera-void

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值