package com.tofly.xrtymis.custom.utils;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.annotation.*;

/**
 * @Author: 翘屁老猫
 * @Date: 2020/10/21 9:59
 * @description:自定义注解继承@RestController和@RequestMapping
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RestController
@RequestMapping
public @interface PathRestController {
    /**
     * "path"和"value"互为别名
     */
    @AliasFor("path")
    String[] value() default {};

    @AliasFor("value")
    String[] path() default {};

}
