Skip to content

Remove ResourceController mappings with param useDefaultLabel #1728

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
Nov 3, 2020
Merged

Remove ResourceController mappings with param useDefaultLabel #1728

merged 1 commit into from
Nov 3, 2020

Conversation

ThomasVitale
Copy link
Contributor

ResourceController has multiple @RequestMappings that would conflict. Currently, to avoid passing the label, we use the useDefaultLabel request parameter to select. Using that parameter to select a different @RequestMapping doesn't work. The two mappings using the parameter have been removed now.

Fixes gh-1643

@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #1728 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1728      +/-   ##
============================================
+ Coverage     77.33%   77.35%   +0.02%     
+ Complexity     1252     1251       -1     
============================================
  Files           160      160              
  Lines          4610     4606       -4     
  Branches        615      615              
============================================
- Hits           3565     3563       -2     
+ Misses          808      806       -2     
  Partials        237      237              
Impacted Files Coverage Δ Complexity Δ
...oud/config/server/resource/ResourceController.java 79.36% <ø> (+1.75%) 19.00 <0.00> (-1.00) ⬆️

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 cb57c25...94bb921. Read the comment docs.

@spencergibb spencergibb merged commit aa0bbff into spring-cloud:master Nov 3, 2020
@adcis
Copy link

adcis commented Dec 3, 2020

@ThomasVitale
Documentation still claims this property can be used
https://cloud.spring.io/spring-cloud-config/multi/multi__serving_plain_text.html

However it was a very useful function. How can I now fetch plain text from "default label" when config client is not aware of label name?

@adcis
Copy link

adcis commented Dec 3, 2020

Hi,

Actually I used this function a lot in older spring version, but now wanted also to use this #1417. Looks like after upgrading to version that includes this feature, useDefaultLabel stopped working, do you have any workaround that would avoid client to "be aware" of default label?

I'd like to serve a plain text with encryption from default branch that the client is now aware of.

@alftheo
Copy link
Contributor

alftheo commented Mar 1, 2021

I created myself a controller with requestmapping
@RequestMapping(value = "/{name}/{profile}/{path:.*}", params = {"useDefaultLabel"})

and that works fine. Can we add that into the project?

@spencergibb
Copy link
Member

@alftheo please open a new issue

@alftheo
Copy link
Contributor

alftheo commented Mar 3, 2021

I've created a new issue #1823 with an attached pull request. Let me know if something is missing bad or wrong

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

Successfully merging this pull request may close these issues.

Remove ResourceController mappigs with param useDefaultLabel
5 participants