Skip to content

Commit ae548a6

Browse files
authored
Merge pull request #75 from devsapp/fix-java11
fix java11
2 parents 180b4d4 + d45a1f6 commit ae548a6

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

event-function/fc-event-java11/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Type: Application
22
Name: start-fc-event-java11
3-
Version: 0.0.1
3+
Version: 0.0.2
44
Provider:
55
- 阿里云
66
Description: 快速部署一个 Java 11 的 Event 类型的 Hello World 函数到阿里云函数计算。

event-function/fc-event-java11/src/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
<properties>
4747
<maven.compiler.release>11</maven.compiler.release>
48+
<maven.compiler.target>11</maven.compiler.target>
49+
<maven.compiler.source>11</maven.compiler.source>
4850
<maven.test.skip>true</maven.test.skip>
4951
</properties>
5052
</project>

event-function/fc-event-java11/src/src/main/java/example/App.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
public class App implements StreamRequestHandler, FunctionInitializer {
1616

1717
public void initialize(Context context) throws IOException {
18-
//TODO
18+
// TODO
1919
}
2020

21-
@Override
2221
public void handleRequest(
2322
InputStream inputStream, OutputStream outputStream, Context context) throws IOException {
2423
outputStream.write(new String("hello world\n").getBytes());

http-function/fc-http-java11/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Type: Application
22
Name: start-fc-http-java11
3-
Version: 0.0.1
3+
Version: 0.0.2
44
Provider:
55
- 阿里云
66
Description: 快速部署一个 Java 8 的 HTTP 类型的 Hello World 函数到阿里云函数计算。

http-function/fc-http-java11/src/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
<properties>
4747
<maven.compiler.release>11</maven.compiler.release>
48+
<maven.compiler.target>11</maven.compiler.target>
49+
<maven.compiler.source>11</maven.compiler.source>
4850
<maven.test.skip>true</maven.test.skip>
4951
</properties>
5052
</project>

http-function/fc-http-java11/src/src/main/java/example/App.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717
public class App implements HttpRequestHandler, FunctionInitializer {
1818

1919
public void initialize(Context context) throws IOException {
20-
//TODO
20+
// TODO
2121
}
2222

23-
@Override
2423
public void handleRequest(HttpServletRequest request, HttpServletResponse response, Context context)
2524
throws IOException, ServletException {
2625
String requestPath = (String) request.getAttribute("FC_REQUEST_PATH");
2726
String requestURI = (String) request.getAttribute("FC_REQUEST_URI");
28-
String requestClientIP = (String) request.getAttribute("FC_REQUEST_CLIENT_IP");
29-
27+
String requestClientIP = (String) request.getAttribute("FC_REQUEST_CLIENT_IP");
28+
3029
response.setStatus(200);
3130
response.setHeader("header1", "value1");
3231
response.setHeader("header2", "value2");

0 commit comments

Comments
 (0)