close

Filter

loading table of contents...

Studio Developer Manual / Version 2010

Table Of Contents

7.28.8.2 Adding a custom PreviewProvider to the PreviewUrlService

Any PreviewProvider 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
  public class CustomPreviewUrlServiceConfig {
    @Bean
    public PreviewProvider<Content> myCustomPreviewProvider(
        SitesService sitesService
    ) {
      return new CustomPreviewProvider(sitesService);
    }
  }

Search Results

Table Of Contents