|
我正在关注
Spring教程,当我尝试启动spring应用程序时出现以下错误:
2016-01-20 23:18:15.907 INFO 5271 — [ main] o.s.boot.SpringApplication : Starting SpringApplication v1.3.1.RELEASE on …
2016-01-20 23:18:15.911 INFO 5271 — [ main] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
2016-01-20 23:18:15.918 ERROR 5271 — [ main] o.s.boot.SpringApplication : Application startup failed java.lang.IllegalArgumentException: Sources must not be empty at org.springframework.util.Assert.notEmpty(Assert.java:276) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:352) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1124) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.main(SpringApplication.java:1140) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
什么是“来源不能为空”错误?
我正在为本教程项目使用Eclipse-Maven项目,我已经更新了项目.我也已经清理并重建了但是我仍然遇到了这个错误.
解决方法
事实证明,我没有在Eclipse中正确设置主类 – Debug和Run配置.我将org.springframework.boot.SpringApplication设置为主类. Main类应该指向我的主类. (编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|