@Configuration @EnableConfigurationProperties(value=EsiDialectProperties.class) @ConditionalOnProperty(prefix="esiinclude-thymeleaf-dialect", value="dialect-enabled", havingValue="true") public class EsiDialectConfiguration extends java.lang.Object
<esi:include> dialect.
You need to provide a fetch function that takes the source url as parameter and returns a response object with the result and status.
This library has a compile-only dependency on thymeleaf3. The user of this library needs to provide the thymeleaf3 dependency at runtime, so that the EsiDialect bean is created and automatically registered as another esi-dialect by spring.
Furthermore this library has a compile-only dependency on com.ning:async-http-client. When this library is provided at runtime, a fetch-function bean is created that uses AsyncHttpClient internally. A user of this library is free to override this bean definition or provide a different implementation for the fetch-function.
| Constructor and Description |
|---|
EsiDialectConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
EsiDialect |
conditionalEsiDialect(EsiContentResolver esiContentResolver) |
EsiContentResolver |
esiContentResolver(Fetch fetch,
EsiDialectProperties properties) |
@Bean @ConditionalOnClass(value=org.thymeleaf.processor.element.AbstractElementTagProcessor.class) @ConditionalOnMissingBean(value=EsiDialect.class) public EsiDialect conditionalEsiDialect(EsiContentResolver esiContentResolver)
@Bean @ConditionalOnClass(value=org.thymeleaf.processor.element.AbstractElementTagProcessor.class) @ConditionalOnMissingBean(value=EsiContentResolver.class) public EsiContentResolver esiContentResolver(Fetch fetch, EsiDialectProperties properties)