Closed eduardomoroni closed 6 years ago
A grande treta parece estar aqui: https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientsConfiguration.java#L75
Uma vez que temos um Bean do tipo Decoder
no contexto do spring, o spring feign nao vai gerar o default decoder.
Como definimod um bean do tipo Decoder
o ElectionDecoder
o spring passa a usa-lo, porque no fim das contas só vai ter ele. O que precisamos fazer é declarar o default Decoder
manualmente, sem o @ ConditionalOnMissingBean
e fazer o spring usa-lo a menos que seja sobrescrito pelo ElectionDecoder
.
Deu pra entender?
Merging #18 into master will decrease coverage by
1.6%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #18 +/- ##
===========================================
- Coverage 65.4% 63.8% -1.61%
Complexity 22 22
===========================================
Files 17 18 +1
Lines 159 163 +4
Branches 5 5
===========================================
Hits 104 104
- Misses 53 57 +4
Partials 2 2
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
...blebee/api/congressman/client/CongressmanClient.kt | 0% <ø> (ø) |
0 <0> (ø) |
:arrow_down: |
.../bumblebee/api/congressman/client/ExpenseClient.kt | 0% <ø> (ø) |
0 <0> (ø) |
:arrow_down: |
...figuration/feign/election/ElectionConfiguration.kt | 0% <ø> (ø) |
0 <0> (ø) |
:arrow_down: |
...bumblebee/configuration/feign/FeignErrorDecoder.kt | 0% <ø> (ø) |
0 <0> (?) |
|
...tion/feign/congressmen/CongressmenConfiguration.kt | 0% <0%> (ø) |
0 <0> (?) |
|
...umblebee/configuration/feign/FeignConfiguration.kt | 0% <0%> (ø) |
0 <0> (ø) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e385cdb...50587e3. Read the comment docs.
fechar este pr @viniciusrdacosta ?
Esse aqui podia fechar ne?
Acho que sei o que está acontecendo @viniciusrdacosta, só nāo sei explicar escrevendo. Do jeito que esse PR esta ambos funcionam, porem o JSON decoder nāo sabe como desserializar uma classe:
Failed to evaluate Jackson deserialization for type [[simple type, class br.com.bumblebee.api.congressman.client.model.CongressmanDetailsClientResponse]]: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Argument #0 of constructor [constructor for br.com.bumblebee.api.congressman.client.model.CongressmanDetailsClientModel, annotations: [null]] has no property name annotation; must have name when multiple-parameter constructor annotated as Creator
Acho que o nosso entendimento de composiçāo de configuraçāo está errado 😅