loading table of contents...

Studio Developer Manual / Version 2310

Table Of Contents Adding a custom Preview Provider to the PreviewUrlService

Any preview provider must be created as a Spring bean. The most convenient way is, to create an additional Spring Boot configuration class and provide a factory method for all additional providers. The preview URL service 'sees' all beans of the type PreviewProvider and registers them. To use them, you have to use the providers bean name (in this example 'myCustomPreviewProvider') in the corresponding configuration content item.

  @Configuration(proxyBeanMethods = false)
  public class CustomPreviewUrlServiceConfig {
    public PreviewProvider<Content> myCustomPreviewProvider(
        SitesService sitesService
    ) {
      return new CustomPreviewProvider(sitesService);

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.