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

Adjust EnvironmentController for Path Pattern Parser #2031

Merged
merged 1 commit into from Feb 15, 2022
Merged

Adjust EnvironmentController for Path Pattern Parser #2031

merged 1 commit into from Feb 15, 2022

Conversation

hpoettker
Copy link
Contributor

Fixes #2020 and #2021.

Config server URLs with paths like /{label}/{application}-{profile}.properties currently do not work as expected when Spring Web MVC uses PathPatternParser instead of AntPathMatcher. But with Spring Boot 2.6. the default matching strategy in the auto-configuration for Web MVC has been flipped to PathPatternParser.

This PR adjusts a regex in EnvironmentController such that both matching strategies work as expected. Furthermore, the Mock MVC tests for the controller are now executed with both strategies. As this is simpler with JUnit 5 than with Junit 4, the two test classes have been migrated.

@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #2031 (1913b2a) into 3.1.x (17ef04a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              3.1.x    #2031   +/-   ##
=========================================
  Coverage     77.22%   77.22%           
  Complexity     1442     1442           
=========================================
  Files           183      183           
  Lines          5362     5362           
  Branches        699      699           
=========================================
  Hits           4141     4141           
  Misses          950      950           
  Partials        271      271           
Impacted Files Coverage Δ
...nfig/server/environment/EnvironmentController.java 91.95% <ø> (ø)

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 17ef04a...1913b2a. Read the comment docs.

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