Closed sendreams closed 4 years ago
hi, below is my code.
`@Configuration public class CharonConfiguration {
@Resource private DispatchProperties dispatchProperties; @Bean CharonConfigurer charonConfigurer(CacheServerRepository cacheServerRepository, CadServerRepository cadServerRepository, TileGet tileGet, @Value("${ware4u.tile.cacheAge}") int cacheAge) { return charonConfiguration() .set(restTemplate() .set(timeout().connection(Duration.ofMillis(dispatchProperties.getConnection())) .read(Duration.ofMillis(dispatchProperties.getRead())) .write(Duration.ofMillis(dispatchProperties.getWrite())))) .set(CadInterceptorConfigurer.configurer() .repository(cadServerRepository)) .add(requestMapping("cad").pathRegex("/api/data/cad/.*")) .set(CacheInterceptorConfigurer.configurer() .repository(cacheServerRepository) .tileGet(tileGet) .cacheAge(cacheAge)) .add(requestMapping("tile").pathRegex("/tile/.*")); }
}`
i have add two interceptor and each one mapping a uri pattern. but in fact, only the last interceptor can be working.
is any wrong here? tks.
hi, i solve the issue, just set the InterceptorConfigurer's type to different type, if is use same type will replace the InterceptorConfigurer.
hi, below is my code.
`@Configuration public class CharonConfiguration {
}`
i have add two interceptor and each one mapping a uri pattern. but in fact, only the last interceptor can be working.
is any wrong here? tks.