Search in sources :

Example 1 with StringUtils.defaultIfBlank

use of org.apache.commons.lang3.StringUtils.defaultIfBlank in project mapton by trixon.

the class MPoiManager method initListeners.

private void initListeners() {
    mDelayedResetRunner = new DelayedResetRunner(200, () -> {
        var allPois = new ArrayList<MPoi>();
        Lookup.getDefault().lookupAll(MPoiProvider.class).forEach(poiProvider -> {
            try {
                for (var poi : poiProvider.getPois()) {
                    poi.setCategory(StringUtils.defaultIfBlank(poi.getCategory(), "_DEFAULT"));
                    poi.setProvider(poiProvider.getName());
                    poi.setZoom(poi.getZoom() != null ? poi.getZoom() : 0.9);
                    allPois.add(poi);
                }
            } catch (Exception e) {
                System.err.println("Failed to load POI from " + poiProvider.getName());
            }
        });
        getAllItems().setAll(allPois);
        // Hand off PoiCategoryCheckTreeView to return refreshed categories
        mTrigRefreshCategoriesProperty.set(System.currentTimeMillis());
    });
    Lookup.getDefault().lookupResult(MPoiProvider.class).addLookupListener(lookupEvent -> {
        mDelayedResetRunner.reset();
    });
    // Gets updated in PoiCategoryCheckTreeView
    mCategoriesProperty.addListener((observable, oldValue, newValue) -> {
        applyFilter();
    });
    selectedItemProperty().addListener((observable, oldValue, newValue) -> {
        sendObjectProperties(newValue);
    });
    MBookmarkManager.getInstance().getItems().addListener((ListChangeListener.Change<? extends MBookmark> c) -> {
        refresh();
    });
    mPolygonFilterManager.addListener(() -> {
        refresh();
    });
}
Also used : Lookup(org.openide.util.Lookup) DelayedResetRunner(se.trixon.almond.util.fx.DelayedResetRunner) ObjectProperty(javafx.beans.property.ObjectProperty) StringHelper(se.trixon.almond.util.StringHelper) StringUtils(org.apache.commons.lang3.StringUtils) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dict(se.trixon.almond.util.Dict) ListChangeListener(javafx.collections.ListChangeListener) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) ObjectUtils(org.apache.commons.lang3.ObjectUtils) Map(java.util.Map) Comparator(java.util.Comparator) DelayedResetRunner(se.trixon.almond.util.fx.DelayedResetRunner)

Example 2 with StringUtils.defaultIfBlank

use of org.apache.commons.lang3.StringUtils.defaultIfBlank in project jun_springboot_api_service by wujun728.

the class SwaggerProvider method swaggerJson.

@ResponseBody
public SwaggerEntity swaggerJson() {
    this.DEFINITION_MAP.clear();
    List<ApiInfo> infos = requestMagicDynamicRegistry.mappings();
    SwaggerEntity swaggerEntity = new SwaggerEntity();
    swaggerEntity.setInfo(info);
    swaggerEntity.setBasePath(this.basePath);
    for (ApiInfo info : infos) {
        String groupName = magicResourceService.getGroupName(info.getGroupId()).replace("/", "-");
        String requestPath = PathUtils.replaceSlash(this.prefix + magicResourceService.getGroupPath(info.getGroupId()) + "/" + info.getPath());
        SwaggerEntity.Path path = new SwaggerEntity.Path(info.getId());
        path.addTag(groupName);
        boolean hasBody = false;
        try {
            List<Map<String, Object>> parameters = parseParameters(info);
            hasBody = parameters.stream().anyMatch(it -> VAR_NAME_REQUEST_BODY.equals(it.get("in")));
            BaseDefinition baseDefinition = info.getRequestBodyDefinition();
            if (hasBody && baseDefinition != null) {
                doProcessDefinition(baseDefinition, info, groupName, "root_", "request", 0);
            }
            parameters.forEach(path::addParameter);
            if (this.persistenceResponseBody) {
                baseDefinition = info.getResponseBodyDefinition();
                if (baseDefinition != null) {
                    Map responseMap = parseResponse(info);
                    if (!responseMap.isEmpty()) {
                        path.setResponses(responseMap);
                        doProcessDefinition(baseDefinition, info, groupName, "root_" + baseDefinition.getName(), "response", 0);
                    }
                } else {
                    path.addResponse("200", JsonUtils.readValue(Objects.toString(info.getResponseBody(), BODY_EMPTY), Object.class));
                }
            }
        } catch (Exception ignored) {
        }
        if (hasBody) {
            path.addConsume("application/json");
        } else {
            path.addConsume("*/*");
        }
        path.addProduce("application/json");
        path.setSummary(info.getName());
        path.setDescription(StringUtils.defaultIfBlank(info.getDescription(), info.getName()));
        swaggerEntity.addPath(requestPath, info.getMethod(), path);
    }
    if (this.DEFINITION_MAP.size() > 0) {
        Set<Map.Entry> entries = ((Map) this.DEFINITION_MAP).entrySet();
        for (Map.Entry entry : entries) {
            swaggerEntity.addDefinitions(Objects.toString(entry.getKey()), entry.getValue());
        }
    }
    return swaggerEntity;
}
Also used : Path(org.ssssssss.magicapi.core.model.Path) DataType(org.ssssssss.magicapi.core.model.DataType) java.util(java.util) JsonUtils(org.ssssssss.magicapi.utils.JsonUtils) PathUtils(org.ssssssss.magicapi.utils.PathUtils) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) RequestMagicDynamicRegistry(org.ssssssss.magicapi.core.service.impl.RequestMagicDynamicRegistry) Constants(org.ssssssss.magicapi.core.config.Constants) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) StringUtils(org.apache.commons.lang3.StringUtils) ApiInfo(org.ssssssss.magicapi.core.model.ApiInfo) MagicConfiguration(org.ssssssss.magicapi.core.config.MagicConfiguration) Path(org.ssssssss.magicapi.core.model.Path) BooleanLiteral(org.ssssssss.script.parsing.ast.literal.BooleanLiteral) CollectionUtils(org.springframework.util.CollectionUtils) BaseDefinition(org.ssssssss.magicapi.core.model.BaseDefinition) MagicResourceService(org.ssssssss.magicapi.core.service.MagicResourceService) BaseDefinition(org.ssssssss.magicapi.core.model.BaseDefinition) ApiInfo(org.ssssssss.magicapi.core.model.ApiInfo) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 3 with StringUtils.defaultIfBlank

use of org.apache.commons.lang3.StringUtils.defaultIfBlank in project jun_springboot_api_service by wujun728.

the class RequestHandler method doValidate.

private Map<String, Object> doValidate(String scriptName, String comment, List<? extends BaseDefinition> validateParameters, Map<String, Object> parameters, JsonCode jsonCode, boolean disabledUnknownParameter) {
    parameters = parameters != null ? parameters : EMPTY_MAP;
    if (CollectionUtils.isEmpty(validateParameters)) {
        return parameters;
    }
    if (disabledUnknownParameter) {
        removeUnknownKey(parameters, validateParameters);
    }
    for (BaseDefinition parameter : validateParameters) {
        if (parameter.getDataType() == DataType.Any) {
            continue;
        }
        // 针对requestBody多层级的情况
        if (DataType.Object == parameter.getDataType()) {
            if (doValidateBody(comment, parameter, parameters, jsonCode, Map.class)) {
                continue;
            }
            doValidate(scriptName, VAR_NAME_REQUEST_BODY, parameter.getChildren(), (Map) parameters.get(parameter.getName()), jsonCode, disabledUnknownParameter);
        } else if (DataType.Array == parameter.getDataType()) {
            if (doValidateBody(comment, parameter, parameters, jsonCode, List.class)) {
                continue;
            }
            List<Object> list = (List) parameters.get(parameter.getName());
            if (list != null) {
                List<Map<String, Object>> newList = list.stream().map(it -> doValidate(scriptName, VAR_NAME_REQUEST_BODY, parameter.getChildren(), new HashMap<String, Object>() {

                    {
                        put(Constants.EMPTY, it);
                    }
                }, jsonCode, disabledUnknownParameter)).collect(Collectors.toList());
                for (int i = 0, size = newList.size(); i < size; i++) {
                    list.set(i, newList.get(i).get(Constants.EMPTY));
                }
            }
        } else if (StringUtils.isNotBlank(parameter.getName()) || parameters.containsKey(parameter.getName())) {
            boolean isFile = parameter.getDataType() == DataType.MultipartFile || parameter.getDataType() == DataType.MultipartFiles;
            String requestValue = StringUtils.defaultIfBlank(Objects.toString(parameters.get(parameter.getName()), Constants.EMPTY), Objects.toString(parameter.getDefaultValue(), Constants.EMPTY));
            if (StringUtils.isBlank(requestValue) && !isFile) {
                if (!parameter.isRequired()) {
                    continue;
                }
                throw new ValidateException(jsonCode, StringUtils.defaultIfBlank(parameter.getError(), String.format("%s[%s]为必填项", comment, parameter.getName())));
            }
            try {
                Object value = convertValue(parameter.getDataType(), parameter.getName(), requestValue);
                if (isFile && parameter.isRequired()) {
                    if (value == null || (parameter.getDataType() == DataType.MultipartFiles && ((List<?>) value).isEmpty())) {
                        throw new ValidateException(jsonCode, StringUtils.defaultIfBlank(parameter.getError(), String.format("%s[%s]为必填项", comment, parameter.getName())));
                    }
                }
                // 正则验证
                if (VALIDATE_TYPE_PATTERN.equals(parameter.getValidateType())) {
                    String expression = parameter.getExpression();
                    if (StringUtils.isNotBlank(expression) && !PatternUtils.match(Objects.toString(value, Constants.EMPTY), expression)) {
                        throw new ValidateException(jsonCode, StringUtils.defaultIfBlank(parameter.getError(), String.format("%s[%s]不满足正则表达式", comment, parameter.getName())));
                    }
                }
                parameters.put(parameter.getName(), value);
            } catch (ValidateException ve) {
                throw ve;
            } catch (Exception e) {
                throw new ValidateException(jsonCode, StringUtils.defaultIfBlank(parameter.getError(), String.format("%s[%s]不合法", comment, parameter.getName())));
            }
        }
    }
    // 取出表达式验证的参数
    List<BaseDefinition> validates = validateParameters.stream().filter(it -> VALIDATE_TYPE_EXPRESSION.equals(it.getValidateType()) && StringUtils.isNotBlank(it.getExpression())).collect(Collectors.toList());
    for (BaseDefinition parameter : validates) {
        MagicScriptContext context = new MagicScriptContext();
        // 将其他参数也放置脚本中,以实现“依赖”的情况
        context.putMapIntoContext(parameters);
        Object value = parameters.get(parameter.getName());
        if (value != null) {
            context.setScriptName(scriptName);
            // 设置自身变量
            context.set(EXPRESSION_DEFAULT_VAR_NAME, value);
            if (!BooleanLiteral.isTrue(ScriptManager.executeExpression(parameter.getExpression(), context))) {
                throw new ValidateException(jsonCode, StringUtils.defaultIfBlank(parameter.getError(), String.format("%s[%s]不满足表达式", comment, parameter.getName())));
            }
        }
    }
    return parameters;
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) RequestEntity(org.ssssssss.magicapi.core.context.RequestEntity) MagicScriptAssertException(org.ssssssss.script.exception.MagicScriptAssertException) RequestParam(org.springframework.web.bind.annotation.RequestParam) PatternUtils(org.ssssssss.magicapi.utils.PatternUtils) java.util(java.util) SessionContext(org.ssssssss.magicapi.core.context.SessionContext) ValidateException(org.ssssssss.magicapi.core.exception.ValidateException) LinkedCaseInsensitiveMap(org.springframework.util.LinkedCaseInsensitiveMap) org.ssssssss.magicapi.core.model(org.ssssssss.magicapi.core.model) JavaInvoker(org.ssssssss.script.reflection.JavaInvoker) LoggerFactory(org.slf4j.LoggerFactory) StringUtils(org.apache.commons.lang3.StringUtils) MagicScriptException(org.ssssssss.script.exception.MagicScriptException) BigDecimal(java.math.BigDecimal) HttpServletRequest(javax.servlet.http.HttpServletRequest) Valid(org.ssssssss.magicapi.core.annotation.Valid) MagicLoggerContext(org.ssssssss.magicapi.core.logging.MagicLoggerContext) Method(java.lang.reflect.Method) RequestInterceptor(org.ssssssss.magicapi.core.interceptor.RequestInterceptor) Logger(org.slf4j.Logger) ScriptManager(org.ssssssss.magicapi.utils.ScriptManager) HttpHeaders(org.springframework.http.HttpHeaders) MediaType(org.springframework.http.MediaType) HttpServletResponse(javax.servlet.http.HttpServletResponse) RequestMagicDynamicRegistry(org.ssssssss.magicapi.core.service.impl.RequestMagicDynamicRegistry) IOException(java.io.IOException) Constants(org.ssssssss.magicapi.core.config.Constants) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) CookieContext(org.ssssssss.magicapi.core.context.CookieContext) Collectors(java.util.stream.Collectors) HttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException) MagicConfiguration(org.ssssssss.magicapi.core.config.MagicConfiguration) Span(org.ssssssss.script.parsing.Span) ObjectConvertExtension(org.ssssssss.script.functions.ObjectConvertExtension) WebSocketSessionManager(org.ssssssss.magicapi.core.config.WebSocketSessionManager) ResultProvider(org.ssssssss.magicapi.core.interceptor.ResultProvider) BooleanLiteral(org.ssssssss.script.parsing.ast.literal.BooleanLiteral) MagicScriptDebugContext(org.ssssssss.script.MagicScriptDebugContext) ServletServerHttpRequest(org.springframework.http.server.ServletServerHttpRequest) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) CollectionUtils(org.springframework.util.CollectionUtils) RequestContext(org.ssssssss.magicapi.core.context.RequestContext) ResponseModule(org.ssssssss.magicapi.modules.servlet.ResponseModule) ResponseEntity(org.springframework.http.ResponseEntity) RequestHeader(org.springframework.web.bind.annotation.RequestHeader) EXCEPTION(org.ssssssss.magicapi.core.config.MessageType.EXCEPTION) MagicScriptContext(org.ssssssss.script.MagicScriptContext) ValidateException(org.ssssssss.magicapi.core.exception.ValidateException) MagicScriptContext(org.ssssssss.script.MagicScriptContext) MagicScriptAssertException(org.ssssssss.script.exception.MagicScriptAssertException) ValidateException(org.ssssssss.magicapi.core.exception.ValidateException) MagicScriptException(org.ssssssss.script.exception.MagicScriptException) IOException(java.io.IOException) HttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException)

Example 4 with StringUtils.defaultIfBlank

use of org.apache.commons.lang3.StringUtils.defaultIfBlank in project jun_springboot_api_service by wujun728.

the class MagicWorkbenchHandler method onLogin.

@Message(MessageType.LOGIN)
public void onLogin(MagicConsoleSession session, String token, String clientId) {
    session.setClientId(clientId);
    MagicUser user = null;
    try {
        user = authorizationInterceptor.getUserByToken(token);
    } catch (Exception e) {
        if (!authorizationInterceptor.requireLogin()) {
            user = guest;
        }
    }
    if (user != null) {
        String ip = Optional.ofNullable(session.getWebSocketSession().getRemoteAddress()).map(it -> it.getAddress().getHostAddress()).orElse("unknown");
        HttpHeaders headers = session.getWebSocketSession().getHandshakeHeaders();
        ip = IpUtils.getRealIP(ip, headers::getFirst, null);
        session.setAttribute(Constants.WEBSOCKET_ATTRIBUTE_USER_ID, user.getId());
        session.setAttribute(Constants.WEBSOCKET_ATTRIBUTE_USER_IP, StringUtils.defaultIfBlank(ip, "unknown"));
        session.setAttribute(Constants.WEBSOCKET_ATTRIBUTE_USER_NAME, user.getUsername());
        session.setActivateTime(System.currentTimeMillis());
        synchronized (MagicWorkbenchHandler.class) {
            if (WebSocketSessionManager.getConsoleSession(clientId) != null) {
                WebSocketSessionManager.sendBySession(session, WebSocketSessionManager.buildMessage(MessageType.LOGIN_RESPONSE, "-1"));
                return;
            }
            WebSocketSessionManager.add(session);
        }
        WebSocketSessionManager.sendBySession(session, WebSocketSessionManager.buildMessage(MessageType.LOGIN_RESPONSE, "1", session.getAttributes()));
        List<Map<String, Object>> messages = getOnlineUsers();
        if (!messages.isEmpty()) {
            WebSocketSessionManager.sendByClientId(session.getClientId(), WebSocketSessionManager.buildMessage(MessageType.ONLINE_USERS, messages));
        }
        WebSocketSessionManager.sendToMachine(MessageType.SEND_ONLINE, session.getClientId());
        WebSocketSessionManager.sendToOther(session.getClientId(), MessageType.USER_LOGIN, session.getAttributes());
    } else {
        WebSocketSessionManager.sendBySession(session, WebSocketSessionManager.buildMessage(MessageType.LOGIN_RESPONSE, "0"));
    }
}
Also used : HttpHeaders(org.springframework.http.HttpHeaders) MagicUser(org.ssssssss.magicapi.core.context.MagicUser) Constants(org.ssssssss.magicapi.core.config.Constants) StringUtils(org.apache.commons.lang3.StringUtils) IpUtils(org.ssssssss.magicapi.utils.IpUtils) Collectors(java.util.stream.Collectors) Message(org.ssssssss.magicapi.core.annotation.Message) WebSocketSessionManager(org.ssssssss.magicapi.core.config.WebSocketSessionManager) List(java.util.List) MagicConsoleSession(org.ssssssss.magicapi.core.context.MagicConsoleSession) Map(java.util.Map) Optional(java.util.Optional) MessageType(org.ssssssss.magicapi.core.config.MessageType) AuthorizationInterceptor(org.ssssssss.magicapi.core.interceptor.AuthorizationInterceptor) HttpHeaders(org.springframework.http.HttpHeaders) MagicUser(org.ssssssss.magicapi.core.context.MagicUser) Map(java.util.Map) Message(org.ssssssss.magicapi.core.annotation.Message)

Example 5 with StringUtils.defaultIfBlank

use of org.apache.commons.lang3.StringUtils.defaultIfBlank in project dhis2-core by dhis2.

the class TrackedEntityRegistrationSMSListener method postProcess.

// -------------------------------------------------------------------------
// IncomingSmsListener implementation
// -------------------------------------------------------------------------
@Override
protected void postProcess(IncomingSms sms, SMSCommand smsCommand, Map<String, String> parsedMessage) {
    String message = sms.getText();
    Date date = SmsUtils.lookForDate(message);
    String senderPhoneNumber = StringUtils.replace(sms.getOriginator(), "+", "");
    Collection<OrganisationUnit> orgUnits = getOrganisationUnits(sms);
    Program program = smsCommand.getProgram();
    OrganisationUnit orgUnit = SmsUtils.selectOrganisationUnit(orgUnits, parsedMessage, smsCommand);
    if (!programService.hasOrgUnit(program, orgUnit)) {
        sendFeedback(SMSCommand.NO_OU_FOR_PROGRAM, senderPhoneNumber, WARNING);
        throw new SMSParserException(SMSCommand.NO_OU_FOR_PROGRAM);
    }
    TrackedEntityInstance trackedEntityInstance = new TrackedEntityInstance();
    trackedEntityInstance.setOrganisationUnit(orgUnit);
    trackedEntityInstance.setTrackedEntityType(trackedEntityTypeService.getTrackedEntityByName(smsCommand.getProgram().getTrackedEntityType().getName()));
    Set<TrackedEntityAttributeValue> patientAttributeValues = new HashSet<>();
    smsCommand.getCodes().stream().filter(code -> parsedMessage.containsKey(code.getCode())).forEach(code -> {
        TrackedEntityAttributeValue trackedEntityAttributeValue = this.createTrackedEntityAttributeValue(parsedMessage, code, trackedEntityInstance);
        patientAttributeValues.add(trackedEntityAttributeValue);
    });
    long trackedEntityInstanceId = 0;
    if (patientAttributeValues.size() > 0) {
        trackedEntityInstanceId = trackedEntityInstanceService.createTrackedEntityInstance(trackedEntityInstance, patientAttributeValues);
    } else {
        sendFeedback("No TrackedEntityAttribute found", senderPhoneNumber, WARNING);
    }
    TrackedEntityInstance tei = trackedEntityInstanceService.getTrackedEntityInstance(trackedEntityInstanceId);
    programInstanceService.enrollTrackedEntityInstance(tei, smsCommand.getProgram(), new Date(), date, orgUnit);
    sendFeedback(StringUtils.defaultIfBlank(smsCommand.getSuccessMessage(), SUCCESS_MESSAGE + tei.getUid()), senderPhoneNumber, INFO);
    update(sms, SmsMessageStatus.PROCESSED, true);
}
Also used : MessageSender(org.hisp.dhis.message.MessageSender) CategoryService(org.hisp.dhis.category.CategoryService) TrackedEntityTypeService(org.hisp.dhis.trackedentity.TrackedEntityTypeService) Date(java.util.Date) TrackedEntityAttributeValue(org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue) StringUtils(org.apache.commons.lang3.StringUtils) Program(org.hisp.dhis.program.Program) HashSet(java.util.HashSet) ProgramStageInstanceService(org.hisp.dhis.program.ProgramStageInstanceService) SmsMessageStatus(org.hisp.dhis.sms.incoming.SmsMessageStatus) SMSParserException(org.hisp.dhis.sms.parse.SMSParserException) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) IncomingSmsService(org.hisp.dhis.sms.incoming.IncomingSmsService) ParserType(org.hisp.dhis.sms.parse.ParserType) SmsUtils(org.hisp.dhis.system.util.SmsUtils) UserService(org.hisp.dhis.user.UserService) Collection(java.util.Collection) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Set(java.util.Set) IncomingSms(org.hisp.dhis.sms.incoming.IncomingSms) TrackedEntityInstanceService(org.hisp.dhis.trackedentity.TrackedEntityInstanceService) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Component(org.springframework.stereotype.Component) SMSCommandService(org.hisp.dhis.sms.command.SMSCommandService) CurrentUserService(org.hisp.dhis.user.CurrentUserService) ProgramInstanceService(org.hisp.dhis.program.ProgramInstanceService) SMSCode(org.hisp.dhis.sms.command.code.SMSCode) ProgramService(org.hisp.dhis.program.ProgramService) SMSCommand(org.hisp.dhis.sms.command.SMSCommand) TrackedEntityAttribute(org.hisp.dhis.trackedentity.TrackedEntityAttribute) Transactional(org.springframework.transaction.annotation.Transactional) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) SMSParserException(org.hisp.dhis.sms.parse.SMSParserException) TrackedEntityAttributeValue(org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Date(java.util.Date) HashSet(java.util.HashSet)

Aggregations

StringUtils (org.apache.commons.lang3.StringUtils)28 Map (java.util.Map)16 Collectors (java.util.stream.Collectors)15 List (java.util.List)12 Logger (org.slf4j.Logger)12 LoggerFactory (org.slf4j.LoggerFactory)12 Slf4j (lombok.extern.slf4j.Slf4j)9 Set (java.util.Set)8 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)8 IOException (java.io.IOException)7 java.util (java.util)7 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)7 Constants (org.ssssssss.magicapi.core.config.Constants)7 HashSet (java.util.HashSet)6 lombok.val (lombok.val)6 Method (java.lang.reflect.Method)5 Collection (java.util.Collection)5 HttpServletRequest (javax.servlet.http.HttpServletRequest)5 HttpServletResponse (javax.servlet.http.HttpServletResponse)5 RequiredArgsConstructor (lombok.RequiredArgsConstructor)5