当单元测试启动应用程序并使用热插拔代理启动时,initializePlugin 报告了 NullPointerException

When the unit test started the application and started with hotswap agent, the initializePlugin reported a NullPointerException

提问人:rocco 提问时间:11/14/2023 最后编辑:rocco 更新时间:11/20/2023 访问量:11

问:

运行单元测试并使用热插拔代理插件时,initializePlugin 会在启动应用程序时报告 NullPointerException 错误

Caused by: java.lang.NullPointerException
    at org.hotswap.agent.config.PluginRegistry.initializePlugin(PluginRegistry.java:179)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:193)
    at org.springframework.context.support.GenericApplicationContext.<init>(GenericApplicationContext.java:113)
    at org.springframework.web.context.support.GenericWebApplicationContext.<init>(GenericWebApplicationContext.java:97)
    at org.springframework.boot.test.context.SpringBootContextLoader$WebConfigurer.lambda$configure$0(SpringBootContextLoader.java:288)
    at org.springframework.boot.SpringApplication.createApplicationContext(SpringApplication.java:610)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:336)

环境:junit4、Spring Boot 2.5.12、热插拔代理 1.4.1

JUnit 热插拔

评论


答: 暂无答案