Commit 6530cb2971e4d43d0913f6d776166d933ed52c00
1 parent
020aaa96
update访问路径
Showing
2 changed files
with
6 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/ShenheApplication.java
| ... | ... | @@ -34,19 +34,19 @@ public class ShenheApplication extends SpringBootServletInitializer { |
| 34 | 34 | * 本机的名称 |
| 35 | 35 | */ |
| 36 | 36 | @Value("${SERVER_NAME}") |
| 37 | - private String SERVER_NAME ; | |
| 37 | + private String SERVER_NAME; | |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * 登录入口 |
| 41 | 41 | */ |
| 42 | 42 | @Value("${SERVICE_LOGIN}") |
| 43 | - private String SERVICE_LOGIN ; | |
| 43 | + private String SERVICE_LOGIN; | |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * 登出 |
| 47 | 47 | */ |
| 48 | 48 | @Value("${SERVICE_LOGINOUT}") |
| 49 | - private String SERVICE_LOGINOUT ; | |
| 49 | + private String SERVICE_LOGINOUT; | |
| 50 | 50 | |
| 51 | 51 | public static void main(String[] args) { |
| 52 | 52 | SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); | ... | ... |
src/main/java/com/cnlive/shenhe/controller/UsersController.java
| ... | ... | @@ -51,8 +51,8 @@ public class UsersController extends BaseController { |
| 51 | 51 | /** |
| 52 | 52 | * 本机的名称 |
| 53 | 53 | */ |
| 54 | - @Value("${SERVER_NAME}") | |
| 55 | - private String SERVER_NAME ; | |
| 54 | + @Value("${spring.localhost.url}") | |
| 55 | + private String redirectURL ; | |
| 56 | 56 | |
| 57 | 57 | @GetMapping(value = "/{id}") |
| 58 | 58 | @ResponseBody |
| ... | ... | @@ -80,7 +80,7 @@ public class UsersController extends BaseController { |
| 80 | 80 | sessionUser.setLogo(user.getUser_logo()); |
| 81 | 81 | sessionUser.setMaster(user.getMaster()); |
| 82 | 82 | request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); |
| 83 | - return "redirect:"+SERVER_NAME+"/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority="; | |
| 83 | + return "redirect:"+redirectURL+"/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority="; | |
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | return "page/error.html"; | ... | ... |