私はSpringアプリケーションの実行可能なjarを作成しようとしています。私は-jar jarファイルのJavaを使用して、それを実行しようとするたびしかし、私はエラーを取得する:maven for springを使用した実行可能ファイルの作成
Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
私は、サーバーを実行するためにEclipseを使用する場合、それは正常に動作
mvn clean compile assembly:single
を使用して実行していますよ。ここに私のPOMファイルは次のとおりです。
<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>aopricing</groupId>
<artifactId>aopricing</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source />
<target />
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>server.Application</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
私は、これは他のスレッドで回答されているが、それらのどれも私のために働いていない知っている、私は日食から実行可能なjarファイルを作成しようとしたが、それは他の問題がありました。
あなたは物事を試しましたか?どのような ?それを繰り返さないように私たちに教えてください。 [this](http://stackoverflow.com/questions/21783391/spring-boot-unable-to-start-embeddedwebapplicationcontext-due-to-missing-embedd)を読んだことがありますか?そして[これ](http://stackoverflow.com/questions/34022580/spring-boot-error-unable-to-start-embeddedwebapplicationcontext-due-to-missing)? [this](https://github.com/spring-projects/spring-boot/issues/861)はどうですか?私はこれらのことが何であるか分かりませんが、 '@ EnableAutoConfiguration'が多くの人々のためにそれを解決したことを知っています。私たちはGoogle検索サービスではなく、urselfを使っています。 – UDKOX
@UDKOXはすでにそれらのすべてを試しました – spearmunkie
あなたはそれらを試しましたか?どれ ?それらを投稿に追加します。あなたが既に試したことを教えてくれないなら、私たちは助けようとしません。 「Eclipseから実行可能なjarファイルを作成しようとしましたが、それには他の問題がありました。あなたはそれらを修正しようとしましたか?尋ねる前にしばらく時間をかけてください。 – UDKOX