You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[validation] detect path in controller annotation param #1582
@RestController("/employees")
public class EmployeeController {
might look correct, but it isn't. @Controller annotations take the bean name as the default parameter (as every other stereotype annotation, too), so the code above is correct, but the author might had in mind to add the default path instead of the bean name.
This issue is to add a validation that detects strings args in controller annotations that look like a path and highlight that this might be wrong. As a quick fix, we can offer to add a @RequestMapping annotation to the class with the mentioned path as a parameter (and remove the parameter from the @Controller annotation).
Activity
martinlippert commentedon Jun 16, 2025
Side note: once implemented, add a comment to https://bsky.app/profile/did:plc:g4h432n63ojky372s3gk4kz3/post/3ljihzzybck2h for this. 😀
GH-1582: validation to detect potential wrong path definitions in res…
martinlippert commentedon Sep 15, 2025
Re-opening this one, since the validation is done, but the quick fix is not.
martinlippert commentedon Sep 30, 2025
Moved the quick fix part of this out to #1656