package com.lanyuanxiaoyao.service.forest;

import com.dtflys.forest.Forest;
import com.dtflys.forest.annotation.Get;

/**
 * @author lanyuanxiaoyao
 * @date 2024-01-24
 */
public class TestClient {
    public static void main(String[] args) {
        TestService testService = Forest.client(TestService.class);
        System.out.println(testService.success());
        System.out.println(testService.error());
    }

    public interface TestService {
        @Get("http://localhost:8000/success")
        String success();

        @Get("http://localhost:8000/error")
        String error();
    }
}
