我有一个使用 1.4.0.M2 的简单 Spring Boot 应用程序,它运行良好。当我将 spring-boot-devtools 添加到组合中时,应用程序拒绝启动:
Exception in thread "main" java.lang.NullPointerException
at org.springframework.boot.devtools.restart.ChangeableUrls.…
getUrlsFromClassPathAttribute(ChangeableUrls.java:121)
罪魁祸首是 javax.inject:javax.inject:1
它不包含 MANIFEST.MF。当然,有人可能会说这是一个有缺陷的 JAR,但不幸的是它是一种很常见的 JAR。在我看来,这种 react 方式像是 Spring Boot 中的一个错误。
如果不使用javax.inject
,如何避免这种行为?
最佳答案
此问题已 fixed on master并将在 Spring Boot 1.4.0.M3
中提供。
关于java - spring-boot-devtools 在缺少 MANIFEST.MF 的 JAR 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36769536/