This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 18ee59e999 [type:improve]Get rid of the dead code and add some
improvements (#5849)
18ee59e999 is described below
commit 18ee59e99982a009696f27b594dc89fbbe6d0cc6
Author: po-168 <[email protected]>
AuthorDate: Tue Dec 17 10:35:58 2024 +0800
[type:improve]Get rid of the dead code and add some improvements (#5849)
* [type:improve] Get rid of the dead code and add some improvements
* [type:improve] Get rid of the dead code and add some improvements
* [type:improve] Get rid of the dead code and add some improvements(#5803)
* [type:improve] Get rid of the dead code and add some improvements(#5848)
---------
Co-authored-by: aias00 <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
---
.../apache/shenyu/admin/service/impl/AlertDispatchServiceImpl.java | 2 +-
.../client/core/client/AbstractContextRefreshedEventListener.java | 4 +---
.../springmvc/ShenyuSpringMvcClientInfoRegisterConfiguration.java | 4 ----
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertDispatchServiceImpl.java
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertDispatchServiceImpl.java
index 8d03c0c006..e1bb8c114e 100644
---
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertDispatchServiceImpl.java
+++
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertDispatchServiceImpl.java
@@ -106,7 +106,7 @@ public class AlertDispatchServiceImpl implements
AlertDispatchService, Disposabl
}
@Override
- public void destroy() throws Exception {
+ public void destroy() {
if (this.workerExecutor != null) {
workerExecutor.shutdownNow();
}
diff --git
a/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/client/AbstractContextRefreshedEventListener.java
b/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/client/AbstractContextRefreshedEventListener.java
index 7e48b58e77..707bb850e2 100644
---
a/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/client/AbstractContextRefreshedEventListener.java
+++
b/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/client/AbstractContextRefreshedEventListener.java
@@ -155,9 +155,7 @@ public abstract class
AbstractContextRefreshedEventListener<T, A extends Annotat
}
if (isDiscoveryLocalMode) {
List<String> namespaceIds = this.getNamespace();
- namespaceIds.forEach(namespaceId -> {
- publisher.publishEvent(buildURIRegisterDTO(context, beans,
namespaceId));
- });
+ namespaceIds.forEach(namespaceId ->
publisher.publishEvent(buildURIRegisterDTO(context, beans, namespaceId)));
}
beans.forEach(this::handle);
Map<String, Object> apiModules =
context.getBeansWithAnnotation(ApiModule.class);
diff --git
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-springmvc/src/main/java/org/apache/shenyu/springboot/starter/client/springmvc/ShenyuSpringMvcClientInfoRegisterConfiguration.java
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-springmvc/src/main/java/org/apache/shenyu/springboot/starter/client/springmvc/ShenyuSpringMvcClientInfoRegisterConfiguration.java
index f8ec089ac2..a3e389498b 100644
---
a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-springmvc/src/main/java/org/apache/shenyu/springboot/starter/client/springmvc/ShenyuSpringMvcClientInfoRegisterConfiguration.java
+++
b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-springmvc/src/main/java/org/apache/shenyu/springboot/starter/client/springmvc/ShenyuSpringMvcClientInfoRegisterConfiguration.java
@@ -74,8 +74,6 @@ public class ShenyuSpringMvcClientInfoRegisterConfiguration {
* @param clientRegisterConfig clientRegisterConfig
* @return ApiMetaRegistrar
*/
-// @Bean(name = "ApiMetaRegistrar")
-// @ConditionalOnProperty(value = "shenyu.register.api.meta.enabled",
matchIfMissing = true, havingValue = "true")
public AbstractApiMetaRegistrar buildApiMetaRegistrar(final
ShenyuClientRegisterEventPublisher publisher,
final
ClientRegisterConfig clientRegisterConfig) {
@@ -89,8 +87,6 @@ public class ShenyuSpringMvcClientInfoRegisterConfiguration {
* @param clientRegisterConfig clientRegisterConfig
* @return ApiDocRegistrar
*/
-// @Bean(name = "ApiDocRegistrar")
-// @ConditionalOnProperty(value = "shenyu.register.api.data.enabled",
matchIfMissing = true, havingValue = "true")
public AbstractApiDocRegistrar buildApiDocRegistrar(final
ShenyuClientRegisterEventPublisher publisher,
final
ClientRegisterConfig clientRegisterConfig) {
return new HttpApiDocRegistrar(publisher, clientRegisterConfig);