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

write more and detail example about drift #70

Open
inotgaoshou opened this issue Jun 14, 2018 · 7 comments
Open

write more and detail example about drift #70

inotgaoshou opened this issue Jun 14, 2018 · 7 comments

Comments

@inotgaoshou
Copy link

as title,I write code as readme,but I can't run the code,could you please write more and detail example,thanks

@yuokada
Copy link

yuokada commented Jun 14, 2018

This repository is useful to write a code.
https://github.com/panchenko/drift-demo

@mingxusong
Copy link

What generics do thrift files support? Are nested generics supported?

@mingxusong
Copy link

Thrift class 'StatusDto' field 'data(3)' type 'T' is not a supported Java type 。How to solve this problem,thanks

@dain
Copy link
Member

dain commented Jul 2, 2018

Yes, arbitrary nested generics are supported.

@dain
Copy link
Member

dain commented Jul 2, 2018

The Thrift protocol requires that all types be know ahead of time. This is typically shared knowledge via an IDL file. So Drift supports things like List<T> but when you use them in a Thrift strict they must be List<SomeConcreteClass>

@mingxusong
Copy link

mingxusong commented Jul 2, 2018

thanks to answer me,and i have another question:I have many thrift interfaces and objects, and I find that the service can be registered successfully, but the result is mapped to the wrong object.
Error:Internal error processing SongMXRetrieveByCode: com.xxx.xxx.MemberInfoDTO cannot be cast to com.xxx.xxx.BasicMemberaddressInfo ; In fact, I do not define the return object "BasicMemberaddressInfo" for this method(add:"SongMXRetrieveByCode" is my method alias,like this @ThriftMethod("SongMXRetrieveByCode"))

@electrum
Copy link
Member

@mingxusong Can you file a new issue and include an example of the code that isn't working?

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

No branches or pull requests

5 participants