Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(integrations/spring): add spring serialize method #5154

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

shoothzj
Copy link
Member

@shoothzj shoothzj commented Oct 2, 2024

Main Issue #5015

Signed-off-by: ZhangJian He <shoothzj@gmail.com>
@shoothzj
Copy link
Member Author

shoothzj commented Oct 2, 2024

@Xuanwo @tisonkun PTAL, thanks :)

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some sample(test) how the serializer can be used? And/Or other similar implement for other Spring Integrations.

@shoothzj
Copy link
Member Author

shoothzj commented Oct 2, 2024

I think Serializer cannot be demonstrated independently at the moment as it works in conjunction with the operations. It is used for serializing any class (by default, we use Jackson Databind). Here’s an example of how it can be used:

public class ExampleEntity {
    private String id;
    private String name;

    // Getters and setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

Then Opertions can be applied by

OpenDALOpertions<ExampleEntity> ops = openDALTemplate.opsForMeasurement(
                ExampleEntity.class);

Then he can do opendal options by this ops handle/

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go ahead. And we'll review the final result.

@tisonkun tisonkun merged commit d6880c6 into apache:main Oct 2, 2024
29 checks passed
@shoothzj shoothzj deleted the serializer branch October 2, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants