File tree Expand file tree Collapse file tree
sec/src/main/java/org/rest/sec/web/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import com .google .common .net .HttpHeaders ;
1616
1717@ Controller
18- @ RequestMapping (value = WebConstants .PATH_SEP )
1918public class RootController {
2019
2120 public RootController () {
@@ -26,10 +25,20 @@ public RootController() {
2625
2726 // search
2827
29- @ SuppressWarnings ("unused" )
28+ @ RequestMapping (value = WebConstants .PATH_SEP , method = RequestMethod .GET )
29+ @ ResponseStatus (value = HttpStatus .NO_CONTENT )
30+ public void rootWithPathSeparator (final UriComponentsBuilder uriBuilder , final HttpServletResponse response ) {
31+ rootInternal (uriBuilder , response );
32+ }
33+
3034 @ RequestMapping (method = RequestMethod .GET )
3135 @ ResponseStatus (value = HttpStatus .NO_CONTENT )
32- public void root (final UriComponentsBuilder uriBuilder , final HttpServletResponse response ) {
36+ public void rootBare (final UriComponentsBuilder uriBuilder , final HttpServletResponse response ) {
37+ rootInternal (uriBuilder , response );
38+ }
39+
40+ @ SuppressWarnings ("unused" )
41+ private void rootInternal (final UriComponentsBuilder uriBuilder , final HttpServletResponse response ) {
3342 final String userUriNew = uriBuilder .path ("/" + URIMappingConstants .USERS ).build ().toUriString ();
3443
3544 final String userUri = LinkUtil .createLinkHeader (WebConstants .PATH_SEP + URIMappingConstants .USERS , LinkUtil .REL_COLLECTION );
You can’t perform that action at this time.
0 commit comments