From 6120de0ccd746aeea725c3c0825ed39a3983d730 Mon Sep 17 00:00:00 2001 From: mkk Date: Thu, 25 Jun 2015 12:55:33 +0800 Subject: [PATCH] Remove Url suffix .htm --- others/oauth_test.txt | 6 +++--- src/main/java/cc/wdcy/web/controller/UserController.java | 2 +- .../cc/wdcy/web/controller/mobile/MobileController.java | 2 +- .../java/cc/wdcy/web/controller/unity/UnityController.java | 2 +- src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp | 2 +- src/main/webapp/index.jsp | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/others/oauth_test.txt b/others/oauth_test.txt index e9741a5..72432f3 100644 --- a/others/oauth_test.txt +++ b/others/oauth_test.txt @@ -1,10 +1,10 @@ 方式1:基于浏览器 (访问时后跳到登录页面,登录成功后跳转到redirect_uri指定的地址) [GET] 说明:只能使用admin或unity 账号登录才能有权限访问,若使用mobile账号登录将返回Access is denied -http://localhost:8080/spring-oauth-server/oauth/authorize?client_id=unity-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2funity%2fdashboard.htm&response_type=code&scope=read +http://localhost:8080/spring-oauth-server/oauth/authorize?client_id=unity-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2funity%2fdashboard&response_type=code&scope=read 说明: 由于mobile-client只支持password,refresh_token, 所以不管用哪个账号登录后都将返回Illegal action -http://localhost:8080/spring-oauth-server/oauth/authorize?client_id=mobile-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2fm%2fdashboard.htm&response_type=code&scope=read +http://localhost:8080/spring-oauth-server/oauth/authorize?client_id=mobile-client&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2fm%2fdashboard&response_type=code&scope=read @@ -13,7 +13,7 @@ http://localhost:8080/spring-oauth-server/oauth/authorize?client_id=mobile-clien http://localhost:8080/spring-oauth-server/unity/dashboard.htm?code=zLl170 通过code换取access_token [GET] -http://localhost:8080/spring-oauth-server/oauth/token?client_id=unity-client&client_secret=unity&grant_type=authorization_code&code=zLl170&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2funity%2fdashboard.htm +http://localhost:8080/spring-oauth-server/oauth/token?client_id=unity-client&client_secret=unity&grant_type=authorization_code&code=zLl170&redirect_uri=http%3a%2f%2flocalhost%3a8080%2fspring-oauth-server%2funity%2fdashboard 方式2:基于客户端 (注意参数中的username,password,对应用户的账号,密码) [GET] diff --git a/src/main/java/cc/wdcy/web/controller/UserController.java b/src/main/java/cc/wdcy/web/controller/UserController.java index 240d899..07a65c1 100644 --- a/src/main/java/cc/wdcy/web/controller/UserController.java +++ b/src/main/java/cc/wdcy/web/controller/UserController.java @@ -17,7 +17,7 @@ public class UserController { * * @return View page */ - @RequestMapping("overview.htm") + @RequestMapping("overview") public String overview() { return "user_overview"; } diff --git a/src/main/java/cc/wdcy/web/controller/mobile/MobileController.java b/src/main/java/cc/wdcy/web/controller/mobile/MobileController.java index b32c378..ebc7e65 100644 --- a/src/main/java/cc/wdcy/web/controller/mobile/MobileController.java +++ b/src/main/java/cc/wdcy/web/controller/mobile/MobileController.java @@ -22,7 +22,7 @@ public class MobileController { private UserService userService; - @RequestMapping("dashboard.htm") + @RequestMapping("dashboard") public String dashboard() { return "mobile/dashboard"; } diff --git a/src/main/java/cc/wdcy/web/controller/unity/UnityController.java b/src/main/java/cc/wdcy/web/controller/unity/UnityController.java index 9981435..28fa385 100644 --- a/src/main/java/cc/wdcy/web/controller/unity/UnityController.java +++ b/src/main/java/cc/wdcy/web/controller/unity/UnityController.java @@ -23,7 +23,7 @@ public class UnityController { private UserService userService; - @RequestMapping("dashboard.htm") + @RequestMapping("dashboard") public String dashboard() { return "unity/dashboard"; } diff --git a/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp b/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp index 3e66a61..a65a29e 100644 --- a/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp +++ b/src/main/webapp/WEB-INF/jsp/clientdetails/test_client.jsp @@ -135,7 +135,7 @@ $scope.implicitRedirectUri = location.href; - $scope.redirectUri = "http://localhost:8080/spring-oauth-server/unity/dashboard.htm"; + $scope.redirectUri = "http://localhost:8080/spring-oauth-server/unity/dashboard"; $scope.implicitRedirectUri = "${clientDetailsDto.webServerRedirectUri}"; diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 6b157c4..a3ac1a7 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -49,13 +49,13 @@ 菜单