2016-10-02 30 views
-5

我GIT克隆spring-boot并想开始spring-boot-sample-web-ui,导入它的IntelliJ IDEA和运行SampleWebUiApplication后,首先我遇到了这个错误提供可以成功运行的样本非常困难或者春天很难自然使用吗?

Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory 

然后加入这个依赖

<dependency> 
     <groupId>org.apache.tomcat.embed</groupId> 
     <artifactId>tomcat-embed-logging-juli</artifactId> 
    </dependency> 

运行它又有另一个错误

Caused by: java.lang.ClassNotFoundException: org.springframework.http.client.support.BasicAuthorizationInterceptor 

是否提供可以开始成功的样本完全是如此困难或者只是春天很难自然使用?

回答

0

如果您是Spring/Spring Boot的新手,推荐使用的方法是查看Getting Started guides。我还没有遇到任何问题,并让他们正常工作。根据你列出的样本,我猜Serving Web Content with Spring MVC将是一个很好的看看。

我在Eclipse的本地环境中尝试了spring-boot-sample-web-ui项目。我没有遇到任何问题,因此它看起来可能是您在IntelliJ中导入/加载项目的方式的问题。

-1

我在POM

 <parent> 
-    <!-- Your own application should inherit from spring-boot-starter-parent --> 
       <groupId>org.springframework.boot</groupId> 
-    <artifactId>spring-boot-samples</artifactId> 
-    <version>1.4.0.BUILD-SNAPSHOT</version> 
+    <artifactId>spring-boot-starter-parent</artifactId> 
+    <version>1.4.0.RELEASE</version> 
     </parent> 
+0

不知道从哪里得到这个例子中解决它通过改变父母,但我不认为任何例子,是旨在通过快照构建版本使用。 – g00glen00b