Git Product home page Git Product logo

yuapi-client-sdk's Introduction

玩具级 starter

为什么做这个 starter

主要是为了跑通发布自定义 sdk 到 Maven **仓库的流程,自己以后写的 starter 可以让任何开发人员使用,无需下载源码本地 install

功能

  • 传入 apikey 生成一个客户端,利用该客户端直接调用 sdk 编写者封装好的方法:输入例如 codeep ,返回 hellocodeep

如何使用

❗ 注意:由于该项目使用 SpringBoot 的版本是 3.0.2,而 SpringBoot 在 3 版本之后就最低支持 JDK 17 了,所以请确保你的 JDK 版本为 17+,以及 SpringBoot 版本在 3 以上

引入依赖

<dependency>
    <groupId>io.github.codeeeep</groupId>
    <artifactId>yuapi-client-sdk</artifactId>
    <version>0.0.1</version>
</dependency>

配置 YML

yuapi:
  client:
    api-key: test

注入客户端,直接访问

这里在 Spring Boot Test 中实验

@SpringBootTest
class TestStarterApplicationTests {

    @Resource
    private YuApiClient yuApiClient;

    @Test
    void contextLoads() {
        String result = yuApiClient.getName("codeep");
        System.out.println(result);
    }

}

参考博客

这里有个很大的坑,网上的大部分博客都是基于 2024 年之前的,但不幸的是 https://issues.sonatype.org/ 在今年 2 月换了发布网站 https://central.sonatype.org/ 所以,参考官方文档进行部署更为稳妥,这里贴出写的较好的博客仅供参考

官方文档1

官方文档2

https://www.jb51.net/article/284320.htm

https://www.jb51.net/article/249377.htm

https://blog.csdn.net/pdsu161530247/article/details/105429597/

yuapi-client-sdk's People

Contributors

codeeeep 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.