2017-11-29 6 views
0

私はgrizzlyとgoogle guiceを使ってRESTFulサービスを作成しました。jureファイルを紺色に展開する方法は?

c:\Java\src\options\console>java -jar target\ServerConsole-V1.jar 

Nov 28, 2017 3:18:01 PM org.glassfish.grizzly.http.server.HttpServer start 
INFO: [HttpServer] Started. 
web server started successfully at http://localhost:8080/ 
...press any key to stop the process 

私はこのサービスをクラウドに展開したいと考えています。私はSpringBootアプリケーションを配備し、jarファイルを使ってwebjobを作成する記事を見つけましたが、これらのどれも私のアプリケーションの仕組みには当てはまりません。

私はWebサーバーを再設計して(春の起動に)する必要がありますか、これをそのまま展開できますか?もしそうなら、どうですか?

のthnx、マット・

EDIT: 私はジェイは、以下の手順に続いてきました。私はタイムアウトエラーを取得し、

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <handlers> 
     <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> 
    </handlers> 
    <httpPlatform processPath="%JAVA_HOME%\bin\java.exe" 
     arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=8080 -jar &quot;%HOME%\site\wwwroot\ServerConsole-V1.jar&quot;"> 
    </httpPlatform> 
    </system.webServer> 
</configuration> 

私はブラウザや郵便配達のいずれかを使用してRESTfulなAPIにアクセスしよう

としてweb.configファイルを作成しました。どうすればこのことを診断できますか?

答えて

0

はあなたの説明によると、あなたの状況は、紺碧のWebアプリケーションへのjarパッケージを配備するに似ています。 Azure Web Appにjarをデプロイする方法の例として、spring-bootプロジェクトをアップロードしました。

ポイント1:pom.xmlファイルが置かれているディレクトリ内のJARパッケージをbulidするmvn packageを使用してください。

enter image description here]

ポイント2: web.configファイルで構成されたjarファイルのパッケージ名がアップロードされたjarパッケージ名と同じであることを確認してください。

enter image description here

web.configファイル

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <handlers> 
     <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> 
    </handlers> 
    <httpPlatform processPath="%JAVA_HOME%\bin\java.exe" 
     arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar &quot;%HOME%\site\wwwroot\<your jar name>&quot;"> 
    </httpPlatform> 
    </system.webServer> 
</configuration> 

ポイント3:クーズーのD:\home\site\wwwroot\ディレクトリにjar filesweb.configを公開するためにFTPを使用してください。

ポイント4:確認ApplicationSettingsは、プロジェクトのようなjdk versiontomcat version一致してください。

enter image description here

は、それはあなたのお役に立てば幸いです。

関連する問題