Skip to content

yuankui/easyio

Repository files navigation

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

About

performing IO the easier way

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages