Skip to content

Conversation

@yyvess
Copy link
Contributor

@yyvess yyvess commented Nov 19, 2021

Fix #2087

Add a field "path/value" on the annotation @RepositoryRestController to be able to set a root path at class level.

@pivotal-cla
Copy link

@yyvess Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@yyvess Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 19, 2021
@yyvess yyvess force-pushed the feature/RepositoryBasePath branch from f34e18a to 0111399 Compare November 19, 2021 08:40
@alienisty
Copy link

@RequestMappig supports an array of paths so I believe we should do the same for @RepositoryRestController

String value() default "";

@AliasFor("value")
String path() default "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RequestMapping allows specifying more than one path, should we do the same here?

Copy link
Contributor Author

@yyvess yyvess Nov 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alienisty I agree, I just update it

@gauravbrills
Copy link

Hope this gets merged soon been a long time . For now we had to do a lot of refactor to avoid this in our latest migration :|

@abtabhi
Copy link

abtabhi commented Jun 2, 2022

can we please triage this

@zampettim
Copy link

We are definitely running into this issue as well, and we have a ton of AbstractControllers with a lot of methods that we inherit. Gettting this fix into the 2.7.x line of Spring Boot would be extremely helpful.

odrotbohm pushed a commit that referenced this pull request Jul 6, 2022
…ositoryRestController.

This commit introduces support for a common base path shared amongst all handler methods of a controller annotated with @BasePathAwareController / @RepositoryRestController.

Related ticket: #2087
Original pull request: #2088.
odrotbohm added a commit that referenced this pull request Jul 6, 2022
Added test case and re-enabled the base URI to be prepended even in case a controller path prefix is configured. That functionality had been lost with the originally submitted changes.

Related ticket: #2087
Original pull request: #2088.
odrotbohm pushed a commit that referenced this pull request Jul 6, 2022
…ositoryRestController.

This commit introduces support for a common base path shared amongst all handler methods of a controller annotated with @BasePathAwareController / @RepositoryRestController.

Related ticket: #2157
Original pull request: #2088.
odrotbohm added a commit that referenced this pull request Jul 6, 2022
Added test case and re-enabled the base URI to be prepended even in case a controller path prefix is configured. That functionality had been lost with the originally submitted changes.

Related ticket: #2157
Original pull request: #2088.
@yyvess
Copy link
Contributor Author

yyvess commented Aug 4, 2022

Commit of this PR was cherry-pick to main branch (Spring data version 4.0.0-M5)

@yyvess yyvess closed this Oct 21, 2022
@yyvess
Copy link
Contributor Author

yyvess commented Oct 21, 2022

Merged by cherry-pick

@yyvess yyvess deleted the feature/RepositoryBasePath branch October 21, 2022 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature regression : Spring Data REST controller must not use @RequestMapping on class level as this would cause double registration with Spring MVC

7 participants