File tree Expand file tree Collapse file tree 6 files changed +10
-8
lines changed
event-function/fc-event-java11
http-function/fc-http-java11 Expand file tree Collapse file tree 6 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11Type : Application
22Name : start-fc-event-java11
3- Version : 0.0.1
3+ Version : 0.0.2
44Provider :
55 - 阿里云
66Description : 快速部署一个 Java 11 的 Event 类型的 Hello World 函数到阿里云函数计算。
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1515public 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 ());
Original file line number Diff line number Diff line change 11Type : Application
22Name : start-fc-http-java11
3- Version : 0.0.1
3+ Version : 0.0.2
44Provider :
55 - 阿里云
66Description : 快速部署一个 Java 8 的 HTTP 类型的 Hello World 函数到阿里云函数计算。
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1717public 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" );
You can’t perform that action at this time.
0 commit comments