close

Filter

loading table of contents...

Studio Developer Manual / Version 2301

Table Of Contents

9.32.8.2 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 document.

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

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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