code: public TemplateAvailabilityProvider getProvider(String view, Environment environment,
  			ClassLoader classLoader, ResourceLoader resourceLoader) {
  		Assert.notNull(view, "View must not be null");
  		Assert.notNull(environment, "Environment must not be null");
  		Assert.notNull(classLoader, "ClassLoader must not be null");
  		Assert.notNull(resourceLoader, "ResourceLoader must not be null");
  		Boolean useCache = environment.getProperty("spring.template.provider.cache",
  				Boolean.class, true);
  		if (!useCache) {
  			return findProvider(view, environment, classLoader, resourceLoader);
  		}
  		TemplateAvailabilityProvider provider = this.resolved.get(view);
  		if (provider == null) {
  			synchronized (this.cache) {
  				provider = findProvider(view, environment, classLoader, resourceLoader);
  				provider = (provider != null) ? provider : NONE;
  				this.resolved.put(view, provider);
  				this.cache.put(view, provider);
  			}
  		}
  		return (provider != NONE) ? provider : null;
  	}
docs: Get the provider that can be used to render the given view.
  @param view the view to render
  @param environment the environment
  @param classLoader the class loader
  @param resourceLoader the resource loader
  @return a {@link TemplateAvailabilityProvider} or null