Closed klopfdreh closed 2 months ago
I think we need someone from the DataFlow team to look into this, as calling Optional.get()
without a guard is clearly problematic. I know too little about DataFlow to judge what could generally cause this. They seem to use a lot of custom RepresentationModel
extenstion that they would of course have to make available for reflection, too.
SCDF 2.x is based on Boot 2.x So there may be elements that hasn't gone through the preparation for AOT and Native support.
Creating a 3.x client will require a separate module with modified copies of related classes that have been updated and tested with Boot 3.x
Beside this there are a lot of frameworks which need to be adjusted to be able to be used with Spring Boot Native.
If you follow my recent changes I contributed a lot to AWS SDK / AWS CRT and also to Spring Cloud Config (https://github.com/spring-cloud/spring-cloud-config/issues/2439) require changes.
What we did is to add all classes in the packages (and sub packages):
and
for reflections, similar like explained here:
https://github.com/hub4j/github-api/issues/1908#issuecomment-2296488149
So there are no issues anymore during the build time but only during the runtime that the links are null like explained in this issue.
So are there any other classes required to be included for reflections? Maybe I am able to make the REST API of SCDF 2.11.x be usable in Spring Boot Native.
Does it make sense to continue the work on this ticket in the SCDF issue tracker?
Does it make sense to continue the work on this ticket in the SCDF issue tracker?
Yes.
Followup ticket is created - I am going to close this one here.
@odrotbohm - I finally solved the issue in the follow up ticket and I think it is a Spring Hateoas issue. I explained it here: https://github.com/spring-cloud/spring-cloud-dataflow/issues/5924#issuecomment-2337411193 - let me know if I should reopened this issue and instead closing the one of the SCDF issue track
Currently we have the issue that _links are not able to be deserialized in one of our Spring Boot Native application at client side (Spring Boot 3.3.2)
We are using the Spring Cloud Data Flow rest client (SCDF 2.11.2) and manually enabled the resources (e.g. RootResource https://github.com/spring-cloud/spring-cloud-dataflow/blob/v2.11.2/spring-cloud-dataflow-rest-resource/src/main/java/org/springframework/cloud/dataflow/rest/resource/RootResource.java and all other resources via RuntimeHintsRegistrar) for reflections.
The
aot-process
however shows that the HATEOAS types are registered for reflections:The error occurs when receiving the
ABOUT_REL
in theDataFlowTemplate
see: https://github.com/spring-cloud/spring-cloud-dataflow/blob/v2.11.2/spring-cloud-dataflow-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/DataFlowTemplate.java#L170We just checked that all required dependencies are included so that the
HypermediaAutoConfiguration
can be loaded.I also tried to add the following annotations to my application without any success.
With a normal Java JVM application the code is running without any issues.