Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

package org.fireflyframework.cache.annotation;

import org.fireflyframework.cache.config.CacheAutoConfiguration;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand All @@ -31,6 +28,10 @@
* support for Firefly cache annotations like {@link Cacheable}, {@link CacheEvict},
* and {@link CachePut}.
* <p>
* Note: The actual auto-configuration is registered via
* {@code META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports}.
* This annotation serves as a marker only.
* <p>
* Example usage:
* <pre>
* &#64;Configuration
Expand All @@ -42,7 +43,6 @@
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import(CacheAutoConfiguration.class)
public @interface EnableCaching {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableAsync;

Expand Down Expand Up @@ -61,7 +60,6 @@
@AutoConfiguration
@ConditionalOnProperty(prefix = "firefly.cache", name = "enabled", havingValue = "true", matchIfMissing = true)
@EnableConfigurationProperties(CacheProperties.class)
@ComponentScan(basePackages = "org.fireflyframework.cache")
@EnableAsync
@Slf4j
public class CacheAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CacheAutoConfigurationRedisIntegrationTest {
.withReuse(true);

private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(CacheAutoConfiguration.class));
.withConfiguration(AutoConfigurations.of(CacheAutoConfiguration.class, RedisCacheAutoConfiguration.class));

@Test
void shouldCreateRedisBeansWhenRedisIsConfigured() {
Expand Down