ワン:Windows上AzureのWebアプリケーションサービスを作成します。
1.を選択し、「Webアプリケーション」の「リソースの作成」
2.リソースグループを作成し、アプリケーションのインスタンス名を作成します
3.「ランタイムスタック、オペレーティングシステム」を選択し、「Windowsの計画」を作成し、他はデフォルト設定のままに
「レビューと作成」ボタンをクリックします。4.は、その後、AzureのWebアプリケーションサービスを作成するには、「作成」ボタンをクリックしてください。
展開後、Webアプリケーションサービスのホームページに戻る5.あなたは自分のアプリのサービスをご確認くださいURLをクリックすることができます。
6.成功を作成するために、あなたのWebアプリケーションサービスを証明するためにどのような情報は、WebアプリケーションサービスのURLをクリック!
2:春ブーツAzureのWebアプリケーションサービスを展開するためのプロジェクト
1.インストールのGit、Mavenの、Java8は、詳細な手順が記載されていません。
地元のクローン2.サンプルプロジェクト「春ブーツは、スタートの取得します」
gitのクローンます。https:// github.com/spring-guides/gs-spring-boot
ディレクトリ構造を「完了」にする3. [
完全なCD GS-春ブート/
4.建設ジャーのMavenでコーティングされました
きれいなパッケージをMVN
5.ローカルのMaven Webアプリケーションで開始
MVNスプリングブート:実行
ブラウザ6.テストWebアプリケーション
http://localhost:8080
出现"Greetings from Spring Boot!",证明 Spring Boot项目在本地构建成功!
7. 下载并且解压FTP工具FileZilla
8. 打开FileZilla程序,配置Host, UserName, Password
找到第一部分创建好的Azure Web App, 到"Deployment Center"页面,选择"FTP"
点击"Dashboard"页面,复制FTPS Endpoint 值到FileZilla的Host,复制Username跟Password值分别到FileZilla的Username 和 Password。
将Host, Username, Password信息输入好之后,点击"Quickconnect",在弹出的对话框中选择Ok接受认证,这样就本地成功连接到Azure上的Web App service。
9. 上传Spring Boot Jar包跟web.config到Azure web app service上
上传Maven构建好的Jar包到 Azure web app上的folder "webapps".
上传web.config文件到Azure web app上的 "wwwroot" 文件夹下
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 "%HOME%\site\wwwroot\webapps\gs-spring-boot-0.1.0.jar""> </httpPlatform> </system.webServer> </configuration>
10. 验证Spring Boot代码部署
登陆到Azure web app service主界面,点击URL Link
至此,第一个Spring Boot项目成功在Azure Web App Service上部署成功!