张延森 2 年之前
父節點
當前提交
064005ac61

+ 27
- 0
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling-httpTrigger.json 查看文件

@@ -0,0 +1,27 @@
1
+{
2
+  "statefulConfig": {
3
+    "triggerName": "httpTrigger",
4
+    "description": "",
5
+    "triggerId": "645ea6cf-1837-476d-a573-44549b2876c0",
6
+    "sourceArn": null,
7
+    "triggerType": "http",
8
+    "invocationRole": null,
9
+    "qualifier": null,
10
+    "urlInternet": "https://invoice-filling-stategr-service-rxjrqjwiow.cn-shanghai.fcapp.run",
11
+    "urlIntranet": "https://invoice-filling-stategr-service-rxjrqjwiow.cn-shanghai-vpc.fcapp.run",
12
+    "triggerConfig": {
13
+      "methods": [
14
+        "GET",
15
+        "POST",
16
+        "PUT",
17
+        "DELETE",
18
+        "HEAD",
19
+        "OPTIONS"
20
+      ],
21
+      "authType": "anonymous"
22
+    },
23
+    "createdTime": "2022-07-18T02:02:16Z",
24
+    "lastModifiedTime": "2022-07-18T02:03:46Z",
25
+    "name": "httpTrigger"
26
+  }
27
+}

+ 45
- 0
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling.json 查看文件

@@ -0,0 +1,45 @@
1
+{
2
+  "statefulConfig": {
3
+    "functionId": "3629aa3b-95ff-4192-a93c-7f976a38182a",
4
+    "functionName": "invoice-filling",
5
+    "description": "发票确认",
6
+    "runtime": "custom",
7
+    "handler": "index.handler",
8
+    "timeout": 30,
9
+    "initializer": "",
10
+    "initializationTimeout": 3,
11
+    "codeSize": 69213899,
12
+    "codeChecksum": "3724623036147462201",
13
+    "memorySize": 1024,
14
+    "gpuMemorySize": null,
15
+    "environmentVariables": {},
16
+    "createdTime": "2022-07-18T02:02:16Z",
17
+    "lastModifiedTime": "2022-07-18T02:03:42Z",
18
+    "instanceConcurrency": 1,
19
+    "instanceSoftConcurrency": null,
20
+    "customContainerConfig": null,
21
+    "caPort": 9000,
22
+    "instanceType": "e1",
23
+    "layers": null,
24
+    "instanceLifecycleConfig": {
25
+      "preFreeze": {
26
+        "handler": "",
27
+        "timeout": 3
28
+      },
29
+      "preStop": {
30
+        "handler": "",
31
+        "timeout": 3
32
+      }
33
+    },
34
+    "customDNS": null,
35
+    "customRuntimeConfig": {
36
+      "command": [
37
+        "java"
38
+      ],
39
+      "args": [
40
+        "org.springframework.boot.loader.JarLauncher"
41
+      ]
42
+    },
43
+    "name": "invoice-filling"
44
+  }
45
+}

+ 37
- 0
deploy/.s/1636896505560465-cn-shanghai-stategrid-service.json 查看文件

@@ -0,0 +1,37 @@
1
+{
2
+  "statefulConfig": {
3
+    "serviceName": "stategrid-service",
4
+    "description": "电网项目",
5
+    "role": "",
6
+    "logConfig": {
7
+      "project": "",
8
+      "logstore": "",
9
+      "enableRequestMetrics": false,
10
+      "enableInstanceMetrics": false,
11
+      "logBeginRule": "None"
12
+    },
13
+    "serviceId": "6e96fa7b-9988-4908-b06a-0aa7e510c881",
14
+    "createdTime": "2022-02-26T04:50:56Z",
15
+    "lastModifiedTime": "2022-07-18T02:03:46Z",
16
+    "vpcConfig": {
17
+      "vpcId": "",
18
+      "vSwitchIds": [],
19
+      "securityGroupId": "",
20
+      "role": "",
21
+      "anytunnelViaENI": null
22
+    },
23
+    "internetAccess": true,
24
+    "nasConfig": {
25
+      "userId": -1,
26
+      "groupId": -1,
27
+      "mountPoints": []
28
+    },
29
+    "vendorConfig": null,
30
+    "tracingConfig": {
31
+      "type": null,
32
+      "params": null,
33
+      "jaegerConfig": null
34
+    },
35
+    "name": "stategrid-service"
36
+  }
37
+}

+ 8
- 0
deploy/.s/fc-cache/1636896505560465-cn-shanghai-stategrid-service_create_resource.json 查看文件

@@ -0,0 +1,8 @@
1
+{
2
+  "functionNames": [
3
+    "stategrid-service/invoice-filling"
4
+  ],
5
+  "domains": [
6
+    "invoice-filling.stategrid.njyunzhi.com"
7
+  ]
8
+}

+ 37
- 0
deploy/.s/invoice-filling.stategrid.njyunzhi.com.json 查看文件

@@ -0,0 +1,37 @@
1
+{
2
+  "domainName": "invoice-filling.stategrid.njyunzhi.com",
3
+  "accountId": "1636896505560465",
4
+  "protocol": "HTTP",
5
+  "certConfig": {
6
+    "certName": null,
7
+    "privateKey": null,
8
+    "certificate": null
9
+  },
10
+  "tlsConfig": {
11
+    "minVersion": null,
12
+    "maxVersion": null,
13
+    "cipherSuites": null
14
+  },
15
+  "apiVersion": "2016-08-15",
16
+  "routeConfig": {
17
+    "routes": [
18
+      {
19
+        "path": "/*",
20
+        "accountId": null,
21
+        "serviceName": "stategrid-service",
22
+        "functionName": "invoice-filling",
23
+        "qualifier": null,
24
+        "methods": [
25
+          "GET",
26
+          "POST",
27
+          "PUT",
28
+          "DELETE",
29
+          "HEAD",
30
+          "OPTIONS"
31
+        ]
32
+      }
33
+    ]
34
+  },
35
+  "createdTime": "2022-07-18T02:03:47Z",
36
+  "lastModifiedTime": "2022-07-18T02:03:47Z"
37
+}

+ 1
- 0
deploy/command.txt 查看文件

@@ -0,0 +1 @@
1
+s deploy -t s.prod.yaml

+ 92
- 0
deploy/s.prod.yaml 查看文件

@@ -0,0 +1,92 @@
1
+# ------------------------------------
2
+#   If you need English case, you can refer to [s_en.yaml] file
3
+# ------------------------------------
4
+#   欢迎您使用阿里云函数计算 FC 组件进行项目开发
5
+#   组件仓库地址:https://github.com/devsapp/fc
6
+#   组件帮助文档:https://www.serverless-devs.com/fc/readme
7
+#   Yaml参考文档:https://www.serverless-devs.com/fc/yaml/readme
8
+#   关于:
9
+#      - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署
10
+#      - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物
11
+#   等问题,可以参考文档:https://www.serverless-devs.com/fc/tips
12
+#   关于如何做CICD等问题,可以参考:https://www.serverless-devs.com/serverless-devs/cicd
13
+#   关于如何进行环境划分等问题,可以参考:https://www.serverless-devs.com/serverless-devs/extend
14
+#   更多函数计算案例,可参考:https://github.com/devsapp/awesome/
15
+#   有问题快来钉钉群问一下吧:33947367
16
+# ------------------------------------
17
+edition: 1.0.0
18
+name: state-grid-invoice-filling
19
+# access 是当前应用所需要的密钥信息配置:
20
+# 密钥配置可以参考:https://www.serverless-devs.com/serverless-devs/command/config
21
+# 密钥使用顺序可以参考:https://www.serverless-devs.com/serverless-devs/tool#密钥使用顺序与规范
22
+access: default
23
+
24
+vars: # 全局变量
25
+  region: cn-shanghai
26
+  service:
27
+    name: stategrid-service
28
+    description: '电网项目'
29
+
30
+services:
31
+  framework: # 业务名称/模块名称
32
+    # 如果只想针对 framework 下面的业务进行相关操作,可以在命令行中加上 framework,例如:
33
+    # 只对framework进行构建:s framework build
34
+    # 如果不带有 framework ,而是直接执行 s build,工具则会对当前Yaml下,所有和 framework 平级的业务模块(如有其他平级的模块,例如下面注释的next-function),按照一定顺序进行 build 操作
35
+    component: fc # 组件名称,Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力
36
+    actions: # 自定义执行逻辑,关于actions 的使用,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#行为描述
37
+#      pre-deploy: # 在deploy之前运行
38
+#        - run: mvn package -DskipTests # 要执行的系统命令,类似于一种钩子的形式
39
+#          path: ./code # 执行系统命令/钩子的路径
40
+    #        - component: fc build --use-docker               # 要运行的组件,格式为【component: 组件名 命令 参数】(可以通过s cli registry search --type Component 获取组件列表)
41
+    #        - plugin: myplugin                               # 与运行的插件 (可以通过s cli registry search --type Plugin 获取组件列表)
42
+    #          args:                                          # 插件的参数信息
43
+    #            testKey: testValue
44
+    #      post-deploy: # 在deploy之后运行
45
+    #        - component: fc versions publish # 要运行的命令行
46
+    props: # 组件的属性值
47
+      region: ${vars.region} # 关于变量的使用方法,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#变量赋值
48
+      service: ${vars.service}
49
+      function:
50
+        name: invoice-filling
51
+        description: '发票确认'
52
+        codeUri: ../target/invoice-0.0.1.jar
53
+        runtime: custom
54
+        memorySize: 1024
55
+        timeout: 30
56
+        customRuntimeConfig:
57
+          command:
58
+            - java
59
+          args:
60
+            - 'org.springframework.boot.loader.JarLauncher'
61
+      triggers:
62
+        - name: httpTrigger
63
+          type: http
64
+          config:
65
+            authType: anonymous
66
+            methods:
67
+              - GET
68
+              - POST
69
+              - PUT
70
+              - DELETE
71
+              - HEAD
72
+              - OPTIONS
73
+      customDomains:
74
+        - domainName: invoice-filling.stategrid.njyunzhi.com
75
+          protocol: HTTP
76
+          routeConfigs:
77
+            - path: /*
78
+
79
+#  next-function: # 第二个函数的案例,仅供参考
80
+#    # 如果在当前项目下执行 s deploy,会同时部署模块:
81
+#    #   helloworld:服务hello-world-service,函数cpp-event-function
82
+#    #   next-function:服务hello-world-service,函数next-function-example
83
+#    # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy
84
+#    # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function
85
+#    # 更多命令可参考:https://www.serverless-devs.com/fc/readme#文档相关
86
+#    component: fc
87
+#    props:
88
+#      region: ${vars.region}
89
+#      service: ${vars.service} # 应用整体的服务配置
90
+#      function: # 定义一个新的函数
91
+#        name: next-function-example
92
+#        description: 'hello world by serverless devs'

+ 1
- 1
pom.xml 查看文件

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.njyunzhi</groupId>
12 12
 	<artifactId>invoice</artifactId>
13
-	<version>0.0.1-SNAPSHOT</version>
13
+	<version>0.0.1</version>
14 14
 	<name>invoice-fill</name>
15 15
 	<description>发票填报</description>
16 16
 	<properties>