0
在我的春节,引导1.5.2应用[]不能被解析为URL,我得到以下异常:春季启动1.5.2:类路径的资源,因为它不存在
java.io.FileNotFoundException: class path resource [] cannot be resolved to URL because it does not exist
,我读了它是Spring Boot 1.4.1中的一个错误,如果没有类标记为@Entity
,但是,我使用更新的版本,并且我也有类注释为@Entity
,所以我真的不知道错误的原因可能是什么。
我SpringApplication
类位于org.common.deployment
和org.common.deployment.model
实体,所以如果我诠释这样我SpringApplication
类的实体应该发现:
@SpringBootApplication
@EnableTransactionManagement
public class DeploymentBootstrapper {
public static void main(String[] args) {
SpringApplication.run(DeploymentBootstrapper.class, args);
}
...
}
只有当我建立在一个项目出现错误GitLab CI服务器,不是如果我在本地运行单元测试。
您不需要用'@ EnableTransactionManagement'注释应用程序。它将基于类路径资源启用。尝试删除它。 https://spring.io/guides/gs/managing-transactions/ –