/easyio

performing IO the easier way

Primary LanguageJava

EasyIO

performing IO the easier way.

Features

  • A powerful framework helps building different IO Runner easily.
  • Implemented runners

Get Started

io.github.yuankui.easyio.runner.http.demo.V2exServiceTest#query

define your interface

@RunWith(HttpRunner.class)
@Host("https://www.v2ex.com")
public interface V2exService {

    @Get("/api/members/show.json")
    UserInfo getUserWithName(@Query("username") String userName);
}

get the instance

@Configuration
@Import(HttpConfiguration.class)
@EasyIOScan("io.github.yuankui.easyio.runner.http.demo")
public class V2exServiceTest {

    @Test
    public void query() {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(V2exServiceTest.class);

        V2exService v2exService = context.getBean(V2exService.class);
        UserInfo result = v2exService.getUserWithName("yuankui");
        System.out.println("result = " + result);
    }
}

TODO

Inspired By

  • MyBatis
  • Retrofit
  • Jpa