解决Disconnected from the target VM, address:

it2025-06-04  7

先上结论:@Value()引入了application.properties里不存在的配置项,所以启动失败。

 

今天遇到了个很坑的问题,IDEA启动SpringBoot项目失败,提示Disconnected from the target VM, address: xxxxx。

百度Google没能解决我的问题。

因为本来可以,突然不行了,所以将local history恢复到可行的历史版本,就可以正常运行。

然后对比发现是@Value()引入了application.properties里不存在的配置项。

解决过程是曲折的,特此记录

 

2020.12.10更新:

还有一种情况也是类似的:

@Autowired private AsyncServiceImpl asyncServiceImpl

如果将service实现类Autowired进来也会启动失败

 

最新回复(0)