apache / dubbo-admin

Compare e2da767 ... +19 ... efb7a8d

Coverage Reach
model/domain/Override.java model/domain/Route.java model/domain/Provider.java model/domain/Consumer.java model/domain/TypeDefinition.java model/domain/ServiceDefinition.java model/domain/Entity.java model/domain/MethodDefinition.java model/domain/MockRule.java model/domain/LoadBalance.java model/domain/Weight.java model/domain/MethodMetadata.java model/domain/Tag.java model/domain/FullServiceDefinition.java model/domain/RegistrySource.java model/store/mesh/virtualservice/match/DubboMethodMatch.java model/store/mesh/virtualservice/match/StringMatch.java model/store/mesh/virtualservice/match/DubboAttachmentMatch.java model/store/mesh/virtualservice/match/DubboMethodArg.java model/store/mesh/virtualservice/match/DoubleMatch.java model/store/mesh/virtualservice/match/DoubleRangeMatch.java model/store/mesh/virtualservice/match/ListStringMatch.java model/store/mesh/virtualservice/match/ListDoubleMatch.java model/store/mesh/virtualservice/match/BoolMatch.java model/store/mesh/virtualservice/match/ListBoolMatch.java model/store/mesh/virtualservice/DubboMatchRequest.java model/store/mesh/virtualservice/destination/DubboDestination.java model/store/mesh/virtualservice/destination/DubboRouteDestination.java model/store/mesh/virtualservice/DubboRoute.java model/store/mesh/virtualservice/DubboRouteDetail.java model/store/mesh/virtualservice/VirtualServiceSpec.java model/store/mesh/virtualservice/VirtualServiceRule.java model/store/mesh/destination/loadbalance/LoadBalancerSettings.java model/store/mesh/destination/loadbalance/SimpleLB.java model/store/mesh/destination/loadbalance/ConsistentHashLB.java model/store/mesh/destination/DestinationRuleSpec.java model/store/mesh/destination/Subset.java model/store/mesh/destination/DestinationRule.java model/store/mesh/destination/TrafficPolicy.java model/store/mesh/destination/ConnectionPoolSettings.java model/store/mesh/destination/TcpKeepalive.java model/store/mesh/destination/TCPSettings.java model/store/mesh/VsDestinationGroup.java model/store/mesh/BaseRule.java model/store/OverrideConfig.java model/store/RoutingRule.java model/store/TagRoute.java model/store/OverrideDTO.java model/dto/RelationDTO.java model/dto/docs/CallDubboServiceRequest.java model/dto/docs/ApiInfoRequest.java model/dto/docs/CallDubboServiceRequestInterfaceParam.java model/dto/ServiceDTO.java model/dto/MetricDTO.java model/dto/MockRuleDTO.java model/dto/ServiceDetailDTO.java model/dto/BaseDTO.java model/dto/ServiceTestDTO.java model/dto/ConfigDTO.java model/dto/RouteDTO.java model/dto/AccessDTO.java model/dto/DynamicConfigDTO.java model/dto/BalancingDTO.java model/dto/WeightDTO.java model/dto/ConditionRouteDTO.java model/dto/MeshRouteDTO.java model/dto/TagRouteDTO.java model/adapter/LoadBalance2OverrideAdapter.java model/adapter/BalancingDTO2OverrideConfigAdapter.java model/adapter/DynamicConfigDTO2OverrideDTOAdapter.java model/adapter/WeightToOverrideAdapter.java common/util/RouteUtils.java common/util/ParseUtils.java common/util/ServiceTestV3Util.java common/util/ServiceTestUtil.java common/util/SyncUtils.java common/util/OverrideUtils.java common/util/ConvertUtil.java common/util/Pair.java common/util/CoderUtil.java common/util/UrlUtils.java common/util/Tool.java common/util/YamlParser.java common/util/Constants.java common/exception/ServiceException.java common/exception/SystemException.java common/exception/ResourceNotFoundException.java common/exception/PermissionDeniedException.java common/exception/ParamValidationException.java common/exception/VersionValidationException.java common/exception/ConfigurationException.java common/CommonResponse.java service/impl/OverrideServiceImpl.java service/impl/RouteServiceImpl.java service/impl/ProviderServiceImpl.java service/impl/InstanceRegistryQueryHelper.java service/impl/MetricsServiceImpl.java service/impl/MockRuleServiceImpl.java service/impl/GenericServiceImpl.java service/impl/MeshRouteServiceImpl.java service/impl/ConsumerServiceImpl.java service/impl/ManagementServiceImpl.java service/impl/MetrcisCollectServiceImpl.java service/impl/InstanceRegistryCache.java service/impl/InterfaceRegistryCache.java service/impl/AbstractService.java service/RegistryServerSync.java service/RegistryCache.java controller/ApiDocsController.java controller/ServiceController.java controller/TagRoutesController.java controller/MetricsCollectController.java controller/ConditionRoutesController.java controller/OverridesController.java controller/AccessesController.java controller/LoadBalanceController.java controller/WeightController.java controller/ManagementController.java controller/ServiceTestController.java controller/MeshRouteController.java controller/beans/DubboApiDocsParamInfoBean.java controller/UserController.java controller/editors/CustomLocalDateTimeEditor.java controller/editors/CustomLocalDateEditor.java controller/MockRuleController.java registry/mapping/impl/NacosServiceMapping.java registry/mapping/impl/ZookeeperServiceMapping.java registry/mapping/impl/NoOpServiceMapping.java registry/mapping/AdminMappingListener.java registry/mapping/AdminServiceInstancesChangedListener.java registry/metadata/impl/NacosMetaDataCollector.java registry/metadata/impl/RedisMetaDataCollector.java registry/metadata/impl/ZookeeperMetaDataCollector.java registry/metadata/impl/ConsulMetaDataCollector.java registry/metadata/impl/NoOpMetadataCollector.java registry/config/impl/MultiDynamicConfiguration.java registry/config/impl/NoOpConfiguration.java utils/ApiDocsDubboGenericUtil.java utils/JwtTokenUtil.java utils/LocalDateTimeUtil.java utils/SpringBeanUtils.java config/ConfigCenter.java config/SwaggerConfiguration.java config/WebMvcConfiguration.java interceptor/AuthInterceptor.java authentication/impl/DefaultPreHandle.java handler/CustomExceptionHandler.java DubboAdminApplication.java provider/MockServiceProvider.java

Flags

Flags have been temporarily removed from this view while the flagging feature is refactored for better performance and user experience.

You can still use flags when viewing individual files. Flag-level thresholds will also remain on pull and merge requests in your repository provider.

More information can be found in our documentation.

Showing 78 of 138 files from the diff.
Other files ignored by Codecov
README.md has changed.
README_ZH.md has changed.
NOTICE has changed.
pom.xml has changed.
.asf.yaml is new.
docker/stack.yml has changed.

@@ -0,0 +1,109 @@
Loading
1 +
/*
2 +
 * Licensed to the Apache Software Foundation (ASF) under one or more
3 +
 * contributor license agreements.  See the NOTICE file distributed with
4 +
 * this work for additional information regarding copyright ownership.
5 +
 * The ASF licenses this file to You under the Apache License, Version 2.0
6 +
 * (the "License"); you may not use this file except in compliance with
7 +
 * the License.  You may obtain a copy of the License at
8 +
 *
9 +
 *     http://www.apache.org/licenses/LICENSE-2.0
10 +
 *
11 +
 * Unless required by applicable law or agreed to in writing, software
12 +
 * distributed under the License is distributed on an "AS IS" BASIS,
13 +
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 +
 * See the License for the specific language governing permissions and
15 +
 * limitations under the License.
16 +
 */
17 +
18 +
package org.apache.dubbo.admin.registry.config.impl;
19 +
20 +
21 +
import org.apache.dubbo.admin.common.util.Constants;
22 +
import org.apache.dubbo.admin.registry.config.GovernanceConfiguration;
23 +
import org.apache.dubbo.common.URL;
24 +
import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
25 +
import org.apache.dubbo.common.config.configcenter.DynamicConfigurationFactory;
26 +
import org.apache.dubbo.common.extension.ExtensionLoader;
27 +
28 +
/**
29 +
 * Use {@link org.apache.dubbo.common.config.configcenter.DynamicConfiguration} adaptation Configuration Center
30 +
 */
31 +
public class MultiDynamicConfiguration implements GovernanceConfiguration {
32 +
33 +
    private URL url;
34 +
35 +
    private DynamicConfiguration dynamicConfiguration;
36 +
37 +
    private String group;
38 +
39 +
    @Override
40 +
    public void init() {
41 +
        if (url == null) {
42 +
            throw new IllegalStateException("server url is null, cannot init");
43 +
        }
44 +
        DynamicConfigurationFactory dynamicConfigurationFactory = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class)
45 +
                .getOrDefaultExtension(url.getProtocol());
46 +
        dynamicConfiguration = dynamicConfigurationFactory.getDynamicConfiguration(url);
47 +
        // group must be consistent with dubbo
48 +
        group = url.getParameter(Constants.GROUP_KEY, Constants.DEFAULT_GROUP);
49 +
    }
50 +
51 +
    @Override
52 +
    public void setUrl(URL url) {
53 +
        this.url = url;
54 +
    }
55 +
56 +
    @Override
57 +
    public URL getUrl() {
58 +
        return url;
59 +
    }
60 +
61 +
    @Override
62 +
    public boolean setConfig(String key, String value) {
63 +
        return setConfig(group, key, value);
64 +
    }
65 +
66 +
    @Override
67 +
    public String getConfig(String key) {
68 +
        return getConfig(group, key);
69 +
    }
70 +
71 +
    @Override
72 +
    public boolean deleteConfig(String key) {
73 +
        return deleteConfig(group, key);
74 +
    }
75 +
76 +
    @Override
77 +
    public boolean setConfig(String group, String key, String value) {
78 +
        if (key == null || value == null) {
79 +
            throw new IllegalArgumentException("key or value cannot be null");
80 +
        }
81 +
        return dynamicConfiguration.publishConfig(key, group, value);
82 +
    }
83 +
84 +
    @Override
85 +
    public String getConfig(String group, String key) {
86 +
        if (key == null) {
87 +
            throw new IllegalArgumentException("key cannot be null");
88 +
        }
89 +
        return dynamicConfiguration.getConfig(key, group);
90 +
    }
91 +
92 +
    @Override
93 +
    public boolean deleteConfig(String group, String key) {
94 +
        if (key == null) {
95 +
            throw new IllegalArgumentException("key cannot be null");
96 +
        }
97 +
        return dynamicConfiguration.removeConfig(key, group);
98 +
    }
99 +
100 +
    @Override
101 +
    public String getPath(String key) {
102 +
        return null;
103 +
    }
104 +
105 +
    @Override
106 +
    public String getPath(String group, String key) {
107 +
        return null;
108 +
    }
109 +
}

@@ -0,0 +1,26 @@
Loading
1 +
/*
2 +
 * Licensed to the Apache Software Foundation (ASF) under one or more
3 +
 * contributor license agreements.  See the NOTICE file distributed with
4 +
 * this work for additional information regarding copyright ownership.
5 +
 * The ASF licenses this file to You under the Apache License, Version 2.0
6 +
 * (the "License"); you may not use this file except in compliance with
7 +
 * the License.  You may obtain a copy of the License at
8 +
 *
9 +
 *     http://www.apache.org/licenses/LICENSE-2.0
10 +
 *
11 +
 * Unless required by applicable law or agreed to in writing, software
12 +
 * distributed under the License is distributed on an "AS IS" BASIS,
13 +
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 +
 * See the License for the specific language governing permissions and
15 +
 * limitations under the License.
16 +
 */
17 +
18 +
package org.apache.dubbo.admin.model.store.mesh.destination;
19 +
20 +
21 +
public class TcpKeepalive {
22 +
    private int probes;
23 +
    private int time;
24 +
    private int interval;
25 +
26 +
}

@@ -0,0 +1,62 @@
Loading
1 +
/*
2 +
 * Licensed to the Apache Software Foundation (ASF) under one or more
3 +
 * contributor license agreements.  See the NOTICE file distributed with
4 +
 * this work for additional information regarding copyright ownership.
5 +
 * The ASF licenses this file to You under the Apache License, Version 2.0
6 +
 * (the "License"); you may not use this file except in compliance with
7 +
 * the License.  You may obtain a copy of the License at
8 +
 *
9 +
 *     http://www.apache.org/licenses/LICENSE-2.0
10 +
 *
11 +
 * Unless required by applicable law or agreed to in writing, software
12 +
 * distributed under the License is distributed on an "AS IS" BASIS,
13 +
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 +
 * See the License for the specific language governing permissions and
15 +
 * limitations under the License.
16 +
 */
17 +
18 +
package org.apache.dubbo.admin.controller;
19 +
20 +
import org.apache.dubbo.admin.annotation.Authority;
21 +
import org.apache.dubbo.admin.model.dto.MockRuleDTO;
22 +
import org.apache.dubbo.admin.service.MockRuleService;
23 +
24 +
import org.springframework.beans.factory.annotation.Autowired;
25 +
import org.springframework.data.domain.Page;
26 +
import org.springframework.data.domain.Pageable;
27 +
import org.springframework.web.bind.annotation.DeleteMapping;
28 +
import org.springframework.web.bind.annotation.GetMapping;
29 +
import org.springframework.web.bind.annotation.PostMapping;
30 +
import org.springframework.web.bind.annotation.RequestBody;
31 +
import org.springframework.web.bind.annotation.RequestMapping;
32 +
import org.springframework.web.bind.annotation.RequestParam;
33 +
import org.springframework.web.bind.annotation.RestController;
34 +
35 +
/**
36 +
 * Mock Rule Controller.
37 +
 */
38 +
@Authority(needLogin = true)
39 +
@RestController
40 +
@RequestMapping("/api/{env}/mock/rule")
41 +
public class MockRuleController {
42 +
43 +
    @Autowired
44 +
    private MockRuleService mockRuleService;
45 +
46 +
    @PostMapping
47 +
    public boolean createOrUpdateMockRule(@RequestBody MockRuleDTO mockRule) {
48 +
        mockRuleService.createOrUpdateMockRule(mockRule);
49 +
        return true;
50 +
    }
51 +
52 +
    @DeleteMapping
53 +
    public boolean deleteMockRule(@RequestBody MockRuleDTO mockRule) {
54 +
        mockRuleService.deleteMockRuleById(mockRule.getId());
55 +
        return true;
56 +
    }
57 +
58 +
    @GetMapping("/list")
59 +
    public Page<MockRuleDTO> listMockRules(@RequestParam(required = false) String filter, Pageable pageable) {
60 +
        return mockRuleService.listMockRulesByPage(filter, pageable);
61 +
    }
62 +
}

@@ -0,0 +1,131 @@
Loading
1 +
/*
2 +
 * Licensed to the Apache Software Foundation (ASF) under one or more
3 +
 * contributor license agreements.  See the NOTICE file distributed with
4 +
 * this work for additional information regarding copyright ownership.
5 +
 * The ASF licenses this file to You under the Apache License, Version 2.0
6 +
 * (the "License"); you may not use this file except in compliance with
7 +
 * the License.  You may obtain a copy of the License at
8 +
 *
9 +
 *     http://www.apache.org/licenses/LICENSE-2.0
10 +
 *
11 +
 * Unless required by applicable law or agreed to in writing, software
12 +
 * distributed under the License is distributed on an "AS IS" BASIS,
13 +
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 +
 * See the License for the specific language governing permissions and
15 +
 * limitations under the License.
16 +
 */
17 +
18 +
package org.apache.dubbo.admin.model.store.mesh.virtualservice;
19 +
20 +
21 +
import org.apache.dubbo.admin.model.store.mesh.virtualservice.match.DoubleMatch;
22 +
import org.apache.dubbo.admin.model.store.mesh.virtualservice.match.DubboAttachmentMatch;
23 +
import org.apache.dubbo.admin.model.store.mesh.virtualservice.match.DubboMethodMatch;
24 +
import org.apache.dubbo.admin.model.store.mesh.virtualservice.match.StringMatch;
25 +
26 +
import java.util.Map;
27 +
28 +
29 +
public class DubboMatchRequest {
30 +
    private String name;
31 +
    private DubboMethodMatch method;
32 +
    private Map<String, String> sourceLabels;
33 +
    private DubboAttachmentMatch attachments;
34 +
    private Map<String, StringMatch> headers;
35 +
    private DoubleMatch threshold;
36 +
37 +
    public String getName() {
38 +
        return name;
39 +
    }
40 +
41 +
    public void setName(String name) {
42 +
        this.name = name;
43 +
    }
44 +
45 +
    public DubboMethodMatch getMethod() {
46 +
        return method;
47 +
    }
48 +
49 +
    public void setMethod(DubboMethodMatch method) {
50 +
        this.method = method;
51 +
    }
52 +
53 +
    public Map<String, String> getSourceLabels() {
54 +
        return sourceLabels;
55 +
    }
56 +
57 +
    public void setSourceLabels(Map<String, String> sourceLabels) {
58 +
        this.sourceLabels = sourceLabels;
59 +
    }
60 +
61 +
    public DubboAttachmentMatch getAttachments() {
62 +
        return attachments;
63 +
    }
64 +
65 +
    public void setAttachments(DubboAttachmentMatch attachments) {
66 +
        this.attachments = attachments;
67 +
    }
68 +
69 +
    public Map<String, StringMatch> getHeaders() {
70 +
        return headers;
71 +
    }
72 +
73 +
    public void setHeaders(Map<String, StringMatch> headers) {
74 +
        this.headers = headers;
75 +
    }
76 +
77 +
    public DoubleMatch getThreshold() {
78 +
        return threshold;
79 +
    }
80 +
81 +
    public void setThreshold(DoubleMatch threshold) {
82 +
        this.threshold = threshold;
83 +
    }
84 +
85 +
86 +
    public static boolean isMatch(DubboMatchRequest dubboMatchRequest,
87 +
                                  String methodName, String[] parameterTypeList, Object[] parameters,
88 +
                                  Map<String, String> sourceLabels,
89 +
                                  Map<String, String> eagleeyeContext, Map<String, String> dubboContext,
90 +
                                  Map<String, String> headers
91 +
    ) {
92 +
        if (dubboMatchRequest.getMethod() != null) {
93 +
            if (!DubboMethodMatch.isMatch(dubboMatchRequest.getMethod(), methodName, parameterTypeList, parameters)) {
94 +
                return false;
95 +
            }
96 +
        }
97 +
98 +
        if (dubboMatchRequest.getSourceLabels() != null) {
99 +
            for (Map.Entry<String, String> entry : dubboMatchRequest.getSourceLabels().entrySet()) {
100 +
                String value = sourceLabels.get(entry.getKey());
101 +
                if (value == null || !entry.getValue().equals(value)) {
102 +
                    return false;
103 +
                }
104 +
            }
105 +
        }
106 +
107 +
        if (dubboMatchRequest.getAttachments() != null) {
108 +
            if (!DubboAttachmentMatch.isMatch(dubboMatchRequest.getAttachments(),eagleeyeContext,dubboContext)){
109 +
                return false;
110 +
            }
111 +
        }
112 +
113 +
        //TODO headers
114 +
115 +
116 +
        return true;
117 +
118 +
    }
119 +
120 +
    @Override
121 +
    public String toString() {
122 +
        return "DubboMatchRequest{" +
123 +
                "name='" + name + '\'' +
124 +
                ", method=" + method +
125 +
                ", sourceLabels=" + sourceLabels +
126 +
                ", attachments=" + attachments +
127 +
                ", headers=" + headers +
128 +
                ", threshold=" + threshold +
129 +
                '}';
130 +
    }
131 +
}

@@ -17,84 +17,68 @@
Loading
17 17
package org.apache.dubbo.admin.controller;
18 18
19 19
import org.apache.dubbo.admin.annotation.Authority;
20 -
20 +
import org.apache.dubbo.admin.authentication.LoginAuthentication;
21 +
import org.apache.dubbo.admin.interceptor.AuthInterceptor;
22 +
import org.apache.dubbo.admin.utils.JwtTokenUtil;
23 +
import org.apache.dubbo.common.extension.ExtensionLoader;
21 24
import org.apache.commons.lang3.StringUtils;
25 +
26 +
import org.springframework.beans.factory.annotation.Autowired;
22 27
import org.springframework.beans.factory.annotation.Value;
23 -
import org.springframework.scheduling.annotation.Scheduled;
24 28
import org.springframework.web.bind.annotation.RequestMapping;
25 29
import org.springframework.web.bind.annotation.RequestMethod;
26 30
import org.springframework.web.bind.annotation.RequestParam;
27 31
import org.springframework.web.bind.annotation.RestController;
28 -
import org.springframework.web.context.request.RequestContextHolder;
29 -
import org.springframework.web.context.request.ServletRequestAttributes;
30 32
31 33
import javax.servlet.http.HttpServletRequest;
32 -
import java.util.Map;
33 -
import java.util.Objects;
34 -
import java.util.UUID;
35 -
import java.util.concurrent.ConcurrentHashMap;
34 +
import javax.servlet.http.HttpServletResponse;
35 +
import java.util.Iterator;
36 +
import java.util.Set;
36 37
37 38
@RestController
38 39
@RequestMapping("/api/{env}/user")
39 40
public class UserController {
40 -
    public static Map<String /*token*/, User /*user info*/> tokenMap = new ConcurrentHashMap<>();
41 41
42 42
    @Value("${admin.root.user.name:}")
43 43
    private String rootUserName;
44 44
    @Value("${admin.root.user.password:}")
45 45
    private String rootUserPassword;
46 -
    //make session timeout configurable
47 -
    //default to be an hour:1000 * 60 * 60
48 -
    @Value("${admin.check.sessionTimeoutMilli:3600000}")
49 -
    private long sessionTimeoutMilli;
46 +
47 +
    @Autowired
48 +
    private JwtTokenUtil jwtTokenUtil;
50 49
51 50
    @RequestMapping(value = "/login", method = RequestMethod.GET)
52 -
    public String login(@RequestParam String userName, @RequestParam String password) {
53 -
        if (StringUtils.isBlank(rootUserName) || (rootUserName.equals(userName) && rootUserPassword.equals(password))) {
54 -
            UUID uuid = UUID.randomUUID();
55 -
            String token = uuid.toString();
56 -
            User user = new User();
57 -
            user.setUserName(userName);
58 -
            user.setLastUpdateTime(System.currentTimeMillis());
59 -
            tokenMap.put(token, user);
60 -
            return token;
51 +
    public String login(HttpServletRequest httpServletRequest, HttpServletResponse response, @RequestParam String userName, @RequestParam String password) {
52 +
        ExtensionLoader<LoginAuthentication> extensionLoader = ExtensionLoader.getExtensionLoader(LoginAuthentication.class);
53 +
        Set<LoginAuthentication> supportedExtensionInstances = extensionLoader.getSupportedExtensionInstances();
54 +
        Iterator<LoginAuthentication> iterator = supportedExtensionInstances.iterator();
55 +
        boolean flag = true;
56 +
        if (iterator != null && !iterator.hasNext()) {
57 +
            if (StringUtils.isBlank(rootUserName) || (rootUserName.equals(userName) && rootUserPassword.equals(password))) {
58 +
                return jwtTokenUtil.generateToken(userName);
59 +
            } else {
60 +
                flag = false;
61 +
            }
62 +
        }
63 +
        while (iterator.hasNext()) {
64 +
            LoginAuthentication loginAuthentication = iterator.next();
65 +
            boolean b = loginAuthentication.authentication(httpServletRequest, userName, password);
66 +
            flag = b & flag;
67 +
            if (!flag) {
68 +
                break;
69 +
            }
70 +
        }
71 +
        if (flag) {
72 +
            return jwtTokenUtil.generateToken(userName);
61 73
        }
74 +
        AuthInterceptor.loginFailResponse(response);
62 75
        return null;
63 76
    }
64 77
65 78
    @Authority(needLogin = true)
66 79
    @RequestMapping(value = "/logout", method = RequestMethod.DELETE)
67 80
    public boolean logout() {
68 -
        HttpServletRequest request =
69 -
                ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
70 -
        String token = request.getHeader("Authorization");
71 -
        return null != tokenMap.remove(token);
72 -
    }
73 -
74 -
    @Scheduled(cron= "0 5 * * * ?")
75 -
    public void clearExpiredToken() {
76 -
        tokenMap.entrySet().removeIf(entry -> entry.getValue() == null || System.currentTimeMillis() - entry.getValue().getLastUpdateTime() > sessionTimeoutMilli);
77 -
    }
78 -
79 -
    public static class User {
80 -
        private String userName;
81 -
        private long lastUpdateTime;
82 -
83 -
        public String getUserName() {
84 -
            return userName;
85 -
        }
86 -
87 -
        public void setUserName(String userName) {
88 -
            this.userName = userName;
89 -
        }
90 -
91 -
        public long getLastUpdateTime() {
92 -
            return lastUpdateTime;
93 -
        }
94 -
95 -
        public void setLastUpdateTime(long lastUpdateTime) {
96 -
            this.lastUpdateTime = lastUpdateTime;
97 -
        }
81 +
        return true;
98 82
    }
99 83
100 84
}

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 17 files with coverage changes found.

Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/DubboAdminApplication.java
-1
+2
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/YamlParser.java
-1
+1
+1
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/config/ConfigCenter.java
+1
+2
+2
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/ProviderServiceImpl.java
-1
+30
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/RegistryServerSync.java
-3
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/Constants.java
-1
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/OverrideServiceImpl.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/ServiceTestUtil.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/controller/ServiceTestController.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/model/domain/Provider.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/AbstractService.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/common/util/SyncUtils.java
-2
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/model/dto/ServiceDTO.java
-1
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/model/dto/ServiceDetailDTO.java
New
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/RouteServiceImpl.java
+2
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java
-3
Loading file...
Changes in dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/impl/GenericServiceImpl.java
-1
Loading file...

21 Commits

+5
-1
-4
-3 Files
-192
-34
-4
-154
+5 Files
+78
+36
+8
+34
+2 Files
+7
+11
+3
-7
+1 Files
+14
+14
+1
+1
-1
-1
+1
+1
+1
+1
+1 Files
+66
+6
+1
+59
+19
+20
-1
+46 Files
+800
+180
-2
+622
Hiding 1 contexual commits
-52 Files
-794
-219
-5
-570
Files Complexity Coverage
dubbo-admin-server/src/main/java/org/apache/dubbo/admin 19.15% 0.11% 21.61%
Project Totals (149 files) 19.15% 21.61%
Loading