All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ideaaedi.extspringcache.EnableExtCache Maven / Gradle / Ivy

There is a newer version: 3.0.2.GAMMA
Show newest version
package com.ideaaedi.extspringcache;


import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.AdviceMode;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 启用ExtCache
 *
 * @author JustryDeng
 * @since 2020/11/4 17:56:18
 */
@SuppressWarnings("unused")
@Documented
@EnableCaching
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@ImportAutoConfiguration(ExtCacheConfiguration.class)
public @interface EnableExtCache {
    
    @AliasFor(annotation = EnableCaching.class)
    boolean proxyTargetClass() default false;
    
    @AliasFor(annotation = EnableCaching.class)
    AdviceMode mode() default AdviceMode.PROXY;
    
    /**
     * 注意: 此ORDER的值需要比ExtCacheAroundHandlerAdvice#getOrder()的值大
     */
    @AliasFor(annotation = EnableCaching.class)
    int order() default Ordered.LOWEST_PRECEDENCE;
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy