Skip to Content
持續交付|使用Java
book

持續交付|使用Java

by Daniel Bryant, Abraham Marín-Pérez
July 2019
Intermediate to advanced
480 pages
9h 35m
Chinese
GoTop Information, Inc.
Content preview from 持續交付|使用Java
在本地工作(如同在生產環境一般) |
199
VS Code 在遠端與本地測試
有時你很難在本地測試函數。例如,你可能依賴某個在雲端運行的服務,很難 stub
mock 它。Azure Functions 可讓你比較輕鬆地對著在雲端運行的 Java 函數進行除錯。
為了按照接下來的指示來操作,你必須註冊一個 Azure 帳戶,並且擁有有效的訂閱,無
論是否免費。要從 VS Code 登入 Azure,你必須在 Command Palette 選擇“Sign In”,
且追隨裝置登入流程(通常會打開你的預設瀏覽器,並引導你前往 Azure 登入網頁)。
登入之後,按下 Azure 面板的“Deploy to Function App”或在 Command Palette 選擇這
個選項。接下來選擇你想要部署的專案的資料夾,並按照提示來設置你的函數專案。部
署函數之後,你會在輸出視窗看到相關的端點。接著可以對這個端點使用 curl,就像對
著在本地運行的函數一樣,見範例 8-43
範例
8-43 curl
部署到
Azure
雲端的
Azure
函數
$ curl -w '\n' https://product-catalogue-5438231.azurewebsites.net/
api/httptrigger-java -d AzureFunctionsRemote
Hello, AzureFunctionsRemote
為了對這個在遠端運行的函數進行除錯,你必須用 Node Package Manager ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
精通機器學習|使用Python

精通機器學習|使用Python

Sarah Guido, Andreas C. Mueller
数字化转型:企业破局的34 个锦囊

数字化转型:企业破局的34 个锦囊

Gary O’Brien, Xiao Guo, Mike Mason

Publisher Resources

ISBN: 9789865021740