ru.tinkoff.kora.http.common.annotation.HttpRoute Maven / Gradle / Ivy
The newest version!
package ru.tinkoff.kora.http.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Русский: Аннотация указывает что метод является HTTP операцией и определяет ее путь и тип
*
* English: Annotation specifies that the method is an HTTP operation and defines its path and type
*
*
* Пример / Example:
*
* {@code
* @HttpClient("my.config")
* public interface MyHttpClient {
*
* @HttpRoute(method = "GET", path = "/username")
* String getUserCode();
* }
* }
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface HttpRoute {
/**
* @return Русский: Описывает метод HTTP обработчика
*
* English: Describes HTTP controller method
* @see ru.tinkoff.kora.http.common.HttpMethod
*/
String method();
/**
* @return Русский: Описывает путь HTTP обработчика
*
* English: Describes HTTP controller path
*/
String path();
}