GH-731 Add support for SDK CloudEvent type

The type itself comes form cloud event sdk. And while s-c-function provides native support for cloud events, this is necessary for cases when user uses CloudEvent type in the signature of a function

Resolves #731
This commit is contained in:
Oleg Zhurakousky
2021-08-31 17:15:51 +02:00
parent 0e2663bd55
commit eccafd3278
9 changed files with 91 additions and 33 deletions

View File

@@ -209,6 +209,7 @@ class FunctionArchiveDeployer extends JarLauncher {
private boolean shouldLoadViaDeployerLoader(String name) {
return name.startsWith("org.reactivestreams")
|| name.startsWith("reactor.")
|| name.startsWith("io.cloudevents")
|| name.startsWith("org.springframework.messaging.Message")
|| name.startsWith("org.springframework.messaging.converter.MessageConverter");
}
@@ -226,9 +227,6 @@ class FunctionArchiveDeployer extends JarLauncher {
else {
return null;
}
// return StringUtils.hasText(functionProperties.getFunctionClass())
// ? functionProperties.getFunctionClass().split(";")
// : new String[] {this.getArchive().getManifest().getMainAttributes().getValue("Function-Class")};
}
catch (Exception e) {
throw new IllegalStateException("Failed to discover function class name", e);