Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

[feat] Support config binding on POJO class #27

Open
syhily opened this issue May 10, 2020 · 4 comments · Fixed by #29
Open

[feat] Support config binding on POJO class #27

syhily opened this issue May 10, 2020 · 4 comments · Fixed by #29

Comments

@syhily
Copy link
Contributor

syhily commented May 10, 2020

The binding on interface is not serializable, supporting POJO would make it more acceptable.

@keykey7
Copy link
Owner

keykey7 commented May 26, 2020

I agree with the pojo support. On the other side I can also totally picture serialization support for the interface proxies.
What's your actual usecase @syhily ?

keykey7 added a commit that referenced this issue May 26, 2020
InterfaceInvocationHandler is now Serializable. It allows simple
serialization IF all the customized configuration values are
serializable, too. Otherwise it will fail lazily while serializing.
Minor: fixed the InterfaceInvocationHandler.toString representation
for empty configurations.

fixes #27
@syhily
Copy link
Contributor Author

syhily commented May 27, 2020

POJO class is better for some streaming systems, I can also add more logic through setter or getter. default value could be easily set at the same time.

I have finished the pojo class binding in my own forks. The pull request would be submitted a few days later.

keykey7 added a commit that referenced this issue May 28, 2020
InterfaceInvocationHandler is now Serializable. It allows simple
serialization IF all the customized configuration values are
serializable, too. Otherwise it will fail lazily while serializing.
Minor: fixed the InterfaceInvocationHandler.toString representation
for empty configurations.

relates to #27
@keykey7 keykey7 reopened this May 28, 2020
@keykey7
Copy link
Owner

keykey7 commented Aug 13, 2020

How fares your POJO-PR @syhily 😉 ? Still up for some code?

@syhily
Copy link
Contributor Author

syhily commented Aug 21, 2020

Sorry for the late response, I'm busy in developing new project these days. I will push the code tomorrow morning.

Update: the new optional type binding is awesome, but I have to adapt the original code to the new logic. 😭

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants