eight-nines commented on code in PR #914:
URL:
https://github.com/apache/incubator-eventmesh/pull/914#discussion_r900116885
##########
eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/WebHookController.java:
##########
@@ -81,14 +93,44 @@ public void execute(String path, Map<String, String>
header, byte[] body) throws
cloudEventId = webHookRequest.getManufacturerEventId();
}
String eventType = manufacturerName + "." +
webHookConfig.getManufacturerEventName();
- CloudEvent event = CloudEventBuilder.v1()
- .withId(cloudEventId)
- .withSubject(webHookConfig.getCloudEventName())
- .withSource(URI.create(webHookConfig.getCloudEventSource()))
- .withDataContentType(webHookConfig.getDataContentType())
- .withType(eventType)
- .withData(body)
+
+ // 4. send cloudEvent
+ Properties properties;
+ try (final InputStream inputStream =
WebHookController.class.getClassLoader().getResourceAsStream("eventmesh.properties"))
{
+ properties = new Properties();
+ properties.load(inputStream);
+ }
Review Comment:
ok,I fixed it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]