@Configuration @EnableConfigurationProperties(value=StaticResourceProperties.class) @ConditionalOnProperty(prefix="static-rewrite", value="enabled", matchIfMissing=true) @ConditionalOnClass(value={org.springframework.web.reactive.function.server.ServerResponse.class,org.springframework.core.io.ResourceLoader.class,org.springframework.web.reactive.function.server.RouterFunction.class}) @AutoConfigureAfter(value=org.springframework.cloud.gateway.config.GatewayAutoConfiguration.class) public class StaticResourceAutoConfiguration extends Object
| 构造器和说明 |
|---|
StaticResourceAutoConfiguration(StaticResourceProperties properties) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.web.reactive.function.server.RouterFunction<org.springframework.web.reactive.function.server.ServerResponse> |
staticResourceLocator(org.springframework.core.io.ResourceLoader resourceLoader,
Map<String,String> staticResources) |
Map<String,String> |
staticResources() |
public StaticResourceAutoConfiguration(StaticResourceProperties properties)
@Bean @ConditionalOnMissingBean(name="staticResources") public Map<String,String> staticResources()
@Bean
@ConditionalOnBean(name="staticResources",
value=java.util.Map.class)
public org.springframework.web.reactive.function.server.RouterFunction<org.springframework.web.reactive.function.server.ServerResponse> staticResourceLocator(org.springframework.core.io.ResourceLoader resourceLoader,
Map<String,String> staticResources)
Copyright © 2020. All rights reserved.