Skip to content

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

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

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

hezhangjian
Copy link
Member

Main Issue #5015

@github-actions github-actions bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Oct 2, 2024
@hezhangjian
Copy link
Member Author

@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.

@hezhangjian
Copy link
Member Author

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
@hezhangjian hezhangjian 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
Labels
releases-note/feat The PR implements a new feature or has a title that begins with "feat"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants