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

@Context parameters not ignored #27

Open
PokingUrsa opened this issue Jun 15, 2019 · 4 comments
Open

@Context parameters not ignored #27

PokingUrsa opened this issue Jun 15, 2019 · 4 comments

Comments

@PokingUrsa
Copy link

PokingUrsa commented Jun 15, 2019

When RESTClient builds a proxy for a web service, it should not include @ Context parameters, since those will be injected by the container.

Instead, it generates warnings:
[ERROR] Multiple candidates for message body: $0 and $2

@konsoletyper
Copy link
Owner

I don't think that's in project's scope. Is @Context parameter about DI? I'm not going to implement DI in Flavour. In this document all supported annotations are enumerated.

@PokingUrsa
Copy link
Author

Could Flavour ignore injected properties, at least? Since they are part of the interface method signature, they seem to be causing problems. Flavour thinks they should be passed from the caller, but they won't be -- they will get added server-side.

@konsoletyper
Copy link
Owner

Why do you need this @Context annotation? What are you going to inject? Can't you inject it into object via constructor rather than passing the service through RPC method? IMO, it's a very bad idea. You claim some service in interface between client and server, but when you call this interface, you should always pass null.

@PokingUrsa
Copy link
Author

That makes sense. I will look to restructure so the interface has only the fields expected from the caller.

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

2 participants