mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
fix load app is null
This commit is contained in:
parent
0ad7934768
commit
d6eaae2492
@ -57,15 +57,18 @@ public class AuthorizeBaseEndpoint {
|
|||||||
|
|
||||||
protected Apps getApp(String id){
|
protected Apps getApp(String id){
|
||||||
Apps app=(Apps)WebContext.getAttribute(WebConstants.AUTHORIZE_SIGN_ON_APP);
|
Apps app=(Apps)WebContext.getAttribute(WebConstants.AUTHORIZE_SIGN_ON_APP);
|
||||||
|
if(StringUtils.isBlank(id)) {
|
||||||
|
_logger.error("parameter for app id " + id + " is null.");
|
||||||
|
}else {
|
||||||
//session中为空或者id不一致重新加载
|
//session中为空或者id不一致重新加载
|
||||||
if(StringUtils.isBlank(id) || !app.getId().equalsIgnoreCase(id)) {
|
if(app == null || !app.getId().equalsIgnoreCase(id)) {
|
||||||
app=appsService.loadById(id);
|
app=appsService.loadById(id);
|
||||||
WebContext.setAttribute(WebConstants.AUTHORIZE_SIGN_ON_APP, app);
|
WebContext.setAttribute(WebConstants.AUTHORIZE_SIGN_ON_APP, app);
|
||||||
}
|
}
|
||||||
if(app == null){
|
|
||||||
_logger.error("Applications for id "+id + " is null");
|
|
||||||
}
|
}
|
||||||
|
if(app == null){
|
||||||
|
_logger.error("Applications id " + id + " is not exist.");
|
||||||
|
}
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,5 +27,5 @@ spring.main.banner-mode =log
|
|||||||
############################################################################
|
############################################################################
|
||||||
#spring.profiles.active https/http; default https #
|
#spring.profiles.active https/http; default https #
|
||||||
############################################################################
|
############################################################################
|
||||||
spring.profiles.active =http
|
spring.profiles.active =https
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user