From 6336a5b899d4c8243a3c9dba5bd20b48cb99599a Mon Sep 17 00:00:00 2001 From: coco-super <48934955+coco-super@users.noreply.github.com> Date: Tue, 9 Apr 2019 10:23:19 +0800 Subject: [PATCH] fix the old version decument (#175) --- examples/java/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/java/README.md b/examples/java/README.md index f7a956452..d0dbfcc95 100644 --- a/examples/java/README.md +++ b/examples/java/README.md @@ -113,21 +113,23 @@ public class App implements StreamRequestHandler ## 利用 fun 进行部署 -完成函数的开发后,就可以通过 fun 的 faas.yaml 文件来配置函数,并实现发布。 +完成函数的开发后,就可以通过 fun 的 template.yaml 文件来配置函数,并实现发布。 ```yaml -function-compute: - region: 'cn-shanghai' # region id - services: - - name: 'java' # service name - description: 'java demo' # service description - functions: - - name: 'helloworld' # function name - description: 'Hello world!' # function description - handler: example.App::handleRequest # handler - runtime: 'java8' # runtime - codes: - - 'demo.jar' # which files should be upload to FC +ROSTemplateFormatVersion: '2015-09-01' +Transform: 'Aliyun::Serverless-2018-04-03' +Resources: + java: + Type: 'Aliyun::Serverless::Service' + Properties: + Description: 'java demo' # service description + helloworld: + Type: 'Aliyun::Serverless::Function' + Properties: + Handler: example.App::handleRequest # handler + Runtime: java8 # runtime + Description: 'Hello world!' # function description + CodeUri: './demo.jar' # Specify where the code is stored and it should be upload to FC ``` 接下来通过`fun deploy`即可实现将函数部署到云端。