У меня есть создать стандартный образец пружины загрузки, используя командуВесенняя обувь не работает?
spring init
Результатом является простой Java проект с ПОМ, как
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>demo.DemoApplication</start-class>
<java.version>1.7</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Когда я ударил
spring run src/main/java/demo/DemoApplication.java
Он пинает меня с сообщением об ошибке, например
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertySourceBootstrapConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.propertySourceLocators; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configServicePropertySource' defined in class org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration$PropertySourceLocatorConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.config.client.ConfigServicePropertySourceLocator]: Factory method 'configServicePropertySource' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/client/HttpServerErrorException
Этого я не могу объяснить. Что я делаю неправильно?
Не могли бы вы включить DemoApplication.java и полный журнал из команды Spring Run? – medvedev1088
здесь вы Full Log: http://pastebin.com/aQzPLvNx DemoApplication.java: http://pastebin.com/Gwt3GfTA Вот полный проект, с изменениями, предложенными @lkrnac HTTPS://dl.dropboxusercontent.com/u/5674395/spring-boot-demo.zip – Aletheia
Это очень странно. Я могу запустить это приложение без каких-либо проблем. Какую ОС вы используете? Можете ли вы включить параметр --debug при запуске приложения и включить полный журнал от начала до конца? – medvedev1088