Git Product home page Git Product logo

crochetwebclient's Introduction

Crochet WebClient

This Java library provides convenient integration with REST APIs using the Spring WebClient and Google Guice for dependency injection. The library is built with Java 17 and managed using Gradle.

Usage

1. Add Dependency

Add the following dependency to your Gradle project:

implementation 'com.github.crochetwebclient:crochetwebclient:1.0.3'

Maven project:

<dependency>
  <groupId>com.github.crochetwebclient</groupId>
  <artifactId>crochetwebclient</artifactId>
  <version>1.0.3</version>
</dependency> 

2. Configuration

Create a configuration class to set up the WebClientService using Google Guice for injection.

@Configuration
public class WebClientConfiguration {
    @Bean
    @Scope(scopeName = "prototype")
    public WebClientService webClientService() {
        Injector injector = Guice.createInjector(new WebClientModule());
        WebClientService service = injector.getInstance(WebClientServiceImpl.class);
        return service;
    }
}

3. Example Usage

Inject WebClientService into your components or services and use it to make REST API calls.

@Service
public class MyApiService {
    private final WebClientService webClientService;

    @Autowired
    public MyApiService(WebClientService webClientService) {
        this.webClientService = webClientService;
    }

    // Your methods that use webClientService for REST API calls
}

Building the Project

To build the project, use the following Gradle command:

./gradlew build

Contributing

Feel free to contribute to the project by forking it and submitting pull requests. Make sure to follow the coding standards and provide tests for new features.

License

This project is licensed under the MIT License.

Acknowledgments

Contact

For any inquiries or issues, please open an issue on the GitHub repository.


Note: Replace your.group, your-artifact, and your-version with your actual group, artifact, and version information.

Feel free to customize this template according to your project's specific needs.

crochetwebclient's People

Contributors

vanluom123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.