@Configuration
@ComponentScan(value="org.apache.shenyu")
@AutoConfigureBefore(value=org.apache.shenyu.web.configuration.SpringExtConfiguration.class)
@Import(value=org.apache.shenyu.web.configuration.ErrorHandlerConfiguration.class)
@AutoConfigureAfter(value=org.apache.shenyu.web.configuration.ShenyuExtConfiguration.class)
public class ShenyuConfiguration
extends java.lang.Object
| 构造器和说明 |
|---|
ShenyuConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.web.server.WebFilter |
collapseSlashesFilter()
Collapse slashes filter web filter.
|
org.apache.shenyu.sync.data.api.MetaDataSubscriber |
commonMetaDataSubscriber(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.base.handler.MetaDataHandler>> metaDataHandlerList)
common meta data subscriber.
|
org.springframework.web.server.WebFilter |
crossFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
Cross filter.
|
org.springframework.web.reactive.DispatcherHandler |
dispatcherHandler()
init dispatch handler.
|
org.springframework.web.server.WebFilter |
excludeFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
Exclude filter.
|
org.springframework.web.server.WebFilter |
fallbackFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig,
org.springframework.web.reactive.DispatcherHandler dispatcherHandler)
fallback filter.
|
org.springframework.web.server.WebFilter |
fileSizeFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
Body web filter.
|
org.springframework.web.server.WebFilter |
healthFilter(org.springframework.web.reactive.DispatcherHandler dispatcherHandler,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
Health filter.
|
org.springframework.web.server.WebFilter |
localDispatcherFilter(org.springframework.web.reactive.DispatcherHandler dispatcherHandler,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
Local dispatcher filter.
|
org.apache.shenyu.sync.data.api.PluginDataSubscriber |
pluginDataSubscriber(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.base.handler.PluginDataHandler>> pluginDataHandlerList,
org.springframework.beans.factory.ObjectProvider<org.springframework.context.ApplicationEventPublisher> eventPublisher,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
common plugin data subscriber.
|
org.apache.shenyu.plugin.api.RemoteAddressResolver |
remoteAddressResolver()
Remote address resolver.
|
org.apache.shenyu.plugin.base.alert.AlarmService |
shenyuAlarmService(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig,
org.springframework.web.client.RestTemplate restTemplate)
shenyu alarm service.
|
org.apache.shenyu.common.config.ShenyuConfig |
shenyuConfig()
shenyu config.
|
org.apache.shenyu.web.loader.ShenyuLoaderService |
shenyuLoaderService(org.apache.shenyu.web.handler.ShenyuWebHandler shenyuWebHandler,
org.apache.shenyu.sync.data.api.PluginDataSubscriber pluginDataSubscriber,
org.apache.shenyu.common.config.ShenyuConfig config)
Shenyu loader service.
|
org.apache.shenyu.plugin.base.trie.ShenyuTrie |
shenyuRuleTrie(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyu rule trie config.
|
org.apache.shenyu.plugin.base.trie.ShenyuTrie |
shenyuSelectorTrie(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyu selector trie config.
|
org.apache.shenyu.plugin.base.trie.ShenyuTrieListener |
shenyuTrieListener()
shenyu trie listener.
|
org.apache.shenyu.web.handler.ShenyuWebHandler |
shenyuWebHandler(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.api.ShenyuPlugin>> plugins,
org.apache.shenyu.common.config.ShenyuConfig config,
org.apache.shenyu.web.loader.ShenyuLoaderService shenyuLoaderService)
Init ShenyuWebHandler.
|
@Bean(value="webHandler")
public org.apache.shenyu.web.handler.ShenyuWebHandler shenyuWebHandler(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.api.ShenyuPlugin>> plugins,
org.apache.shenyu.common.config.ShenyuConfig config,
@Lazy
org.apache.shenyu.web.loader.ShenyuLoaderService shenyuLoaderService)
plugins - this plugins is All impl ShenyuPlugin.config - the configshenyuLoaderService - theLoaderServer@Bean(value="dispatcherHandler") public org.springframework.web.reactive.DispatcherHandler dispatcherHandler()
DispatcherHandler.@Bean
public org.apache.shenyu.sync.data.api.PluginDataSubscriber pluginDataSubscriber(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.base.handler.PluginDataHandler>> pluginDataHandlerList,
org.springframework.beans.factory.ObjectProvider<org.springframework.context.ApplicationEventPublisher> eventPublisher,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
pluginDataHandlerList - the plugin data handler listeventPublisher - event publishershenyuConfig - shenyu config@Bean public org.apache.shenyu.sync.data.api.MetaDataSubscriber commonMetaDataSubscriber(org.springframework.beans.factory.ObjectProvider<java.util.List<org.apache.shenyu.plugin.base.handler.MetaDataHandler>> metaDataHandlerList)
metaDataHandlerList - the meta data handler list@Bean
public org.apache.shenyu.web.loader.ShenyuLoaderService shenyuLoaderService(org.apache.shenyu.web.handler.ShenyuWebHandler shenyuWebHandler,
org.apache.shenyu.sync.data.api.PluginDataSubscriber pluginDataSubscriber,
org.apache.shenyu.common.config.ShenyuConfig config)
shenyuWebHandler - the shenyu web handlerpluginDataSubscriber - the plugin data subscriberconfig - the config@Bean @ConditionalOnMissingBean(value=org.apache.shenyu.plugin.api.RemoteAddressResolver.class) public org.apache.shenyu.plugin.api.RemoteAddressResolver remoteAddressResolver()
@Bean
@Order(value=-300)
@ConditionalOnProperty(value="shenyu.switchConfig.collapseSlashes",
havingValue="true")
public org.springframework.web.server.WebFilter collapseSlashesFilter()
@Bean
@Order(value=-200)
@ConditionalOnProperty(name="shenyu.local.enabled",
havingValue="true",
matchIfMissing=true)
public org.springframework.web.server.WebFilter localDispatcherFilter(org.springframework.web.reactive.DispatcherHandler dispatcherHandler,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
dispatcherHandler - the dispatcher handlershenyuConfig - the shenyuConfig@Bean
@Order(value=-100)
@ConditionalOnProperty(name="shenyu.cross.enabled",
havingValue="true")
public org.springframework.web.server.WebFilter crossFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyuConfig - the shenyu config@Bean
@Order(value=-10)
@ConditionalOnProperty(name="shenyu.file.enabled",
havingValue="true")
public org.springframework.web.server.WebFilter fileSizeFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyuConfig - the shenyu config@Bean
@Order(value=-5)
@ConditionalOnProperty(name="shenyu.exclude.enabled",
havingValue="true")
public org.springframework.web.server.WebFilter excludeFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyuConfig - the shenyu config@Bean
@Order(value=-5)
@ConditionalOnProperty(name="shenyu.fallback.enabled",
havingValue="true")
public org.springframework.web.server.WebFilter fallbackFilter(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig,
org.springframework.web.reactive.DispatcherHandler dispatcherHandler)
shenyuConfig - the shenyu configdispatcherHandler - the dispatcher handler@Bean
@Order(value=-99)
@ConditionalOnProperty(name="shenyu.health.enabled",
havingValue="true")
public org.springframework.web.server.WebFilter healthFilter(org.springframework.web.reactive.DispatcherHandler dispatcherHandler,
org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
dispatcherHandler - the dispatcher handlershenyuConfig - the shenyu config@Bean @ConfigurationProperties(prefix="shenyu") public org.apache.shenyu.common.config.ShenyuConfig shenyuConfig()
@Bean(name="shenyuSelectorTrie") public org.apache.shenyu.plugin.base.trie.ShenyuTrie shenyuSelectorTrie(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyuConfig - shenyu config@Bean(name="shenyuRuleTrie") public org.apache.shenyu.plugin.base.trie.ShenyuTrie shenyuRuleTrie(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig)
shenyuConfig - shenyu trie config@Bean public org.apache.shenyu.plugin.base.trie.ShenyuTrieListener shenyuTrieListener()
@Bean
public org.apache.shenyu.plugin.base.alert.AlarmService shenyuAlarmService(org.apache.shenyu.common.config.ShenyuConfig shenyuConfig,
org.springframework.web.client.RestTemplate restTemplate)
restTemplate - restTemplateshenyuConfig - shenyuConfigCopyright © 2026 The Apache Software Foundation. All rights reserved.