class RedisProjectGenerationConfiguration {

	@Bean
	@ConditionalOnRequestedDependency("testcontainers")
	ServiceConnectionsCustomizer redisServiceConnectionsCustomizer(Build build, DockerServiceResolver serviceResolver) {<FILL_FUNCTION_BODY>}

	@Bean
	@ConditionalOnRequestedDependency("docker-compose")
	ComposeFileCustomizer redisComposeFileCustomizer(Build build, DockerServiceResolver serviceResolver) {
		return (composeFile) -> {
			if (isRedisEnabled(build)) {
				serviceResolver.doWith("redis", (service) -> composeFile.services().add("redis", service));
			}
		};
	}

	private boolean isRedisEnabled(Build build) {
		return (build.dependencies().has("data-redis") || build.dependencies().has("data-redis-reactive"));
	}

}

		return (serviceConnections) -> {
			if (isRedisEnabled(build)) {
				serviceResolver.doWith("redis", (service) -> serviceConnections
					.addServiceConnection(ServiceConnection.ofGenericContainer("redis", service, "redis")));
			}
		};
	
<no_super_class>