-
Notifications
You must be signed in to change notification settings - Fork 986
Url template #14532
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
base: main
Are you sure you want to change the base?
Url template #14532
Conversation
|
🔧 The result from spotlessApply was committed to the PR branch. |
@Munken please sign the CLA. Please also add tests. |
try { | ||
httpRequestClass = Class.forName("org.springframework.http.HttpRequest"); | ||
} catch (ClassNotFoundException e) { | ||
// ignored | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to forName this class as it must be present.
try { | ||
getAttributes = | ||
lookup.findVirtual( | ||
httpRequestClass, "getAttributes", MethodType.methodType(java.util.Map.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could import java.util.Map
This implements
url.template
for WebClient and RestClient.Attributes was first introduced in RestClient beginning with Spring 6.2.
I access it using reflection using a similar pattern to how the status code is accessed.
The other alternatives are:
spring-web-3-1/library
to provide aspring-web-6-2/library