新增首页跳转
This commit is contained in:
parent
71e7b5ed3d
commit
781b42cbdc
@ -5,6 +5,7 @@ import com.cm.common.config.properties.OauthProperties;
|
||||
import com.cm.common.config.properties.SystemProperties;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.pojo.bos.UserInfoBO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -37,7 +38,12 @@ public class RouteController {
|
||||
ModelAndView mv = new ModelAndView("index");
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
mv.addObject("userUsername", userInfoBO.getUserUsername());
|
||||
mv.addObject("oauthServer", oauthProperties.getOauthServer());
|
||||
// 门户URL不存在,跳转统一用户
|
||||
if (StringUtils.isBlank(systemProperties.getPortalUrl())) {
|
||||
mv.addObject("oauthServer", oauthProperties.getOauthServer());
|
||||
} else {
|
||||
mv.addObject("oauthServer", systemProperties.getPortalUrl());
|
||||
}
|
||||
mv.addObject("title", systemProperties.getTitle());
|
||||
return mv;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ public class SystemProperties {
|
||||
private Integer port;
|
||||
private String url;
|
||||
private String title;
|
||||
private String portalUrl;
|
||||
private String loginPageName;
|
||||
|
||||
public Integer getPort() {
|
||||
@ -46,6 +47,14 @@ public class SystemProperties {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getPortalUrl() {
|
||||
return portalUrl == null ? "" : portalUrl.trim();
|
||||
}
|
||||
|
||||
public void setPortalUrl(String portalUrl) {
|
||||
this.portalUrl = portalUrl;
|
||||
}
|
||||
|
||||
public String getLoginPageName() {
|
||||
return loginPageName == null ? "" : loginPageName.trim();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user