Files
senmesh-zc/backend/src/main/java/com/senmesh/common/annotation/CheckAndMock.java

57 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.senmesh.common.annotation;
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;
import com.senmesh.common.constant.ProjectProfileEnum;
/**
* 校验并mock
*
* @author sr on 2020-05-20
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CheckAndMock {
/**
* 属性前缀
*
* @return
* @author sr on 2020-05-20
*/
String propertyPrefix() default "";
/**
* 属性配置类
*
* @return
* @author sr on 2020-05-20
*/
Class<ICheckAndMockPropertity> checkAndMockPropertity() default ICheckAndMockPropertity.class;
/**
* mock实现类(需注入spring上下文,提供与原方法方法名/参数/返回对象一致的方法)
*
* @return
* @author sr on 2020-05-20
*/
Class<?> mockClass();
// String mockBeanId();
/**
* 指定环境直接mock
*
* @return
* @author sr on 2020-05-21
*/
ProjectProfileEnum[] mockIfInProfile() default {};
}