{"id":19448539,"url":"https://github.com/vnt-dev/myrpc","last_synced_at":"2025-04-30T15:42:39.279Z","repository":{"id":105568472,"uuid":"244080364","full_name":"vnt-dev/MyRPC","owner":"vnt-dev","description":"一个RPC框架","archived":false,"fork":false,"pushed_at":"2023-05-26T22:15:43.000Z","size":190,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T15:42:33.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vnt-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-01T03:32:21.000Z","updated_at":"2024-08-13T08:09:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"1612bc41-325a-405c-8b4d-a2dc961c0f92","html_url":"https://github.com/vnt-dev/MyRPC","commit_stats":null,"previous_names":["vnt-dev/myrpc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnt-dev%2FMyRPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnt-dev%2FMyRPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnt-dev%2FMyRPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnt-dev%2FMyRPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vnt-dev","download_url":"https://codeload.github.com/vnt-dev/MyRPC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251733769,"owners_count":21635016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T16:27:26.144Z","updated_at":"2025-04-30T15:42:39.218Z","avatar_url":"https://github.com/vnt-dev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyRPC\n一个RPC框架\n## 使用方式：\n\n1.编译代码 mvn install到本地maven仓库\n\n2.构建springboot工程，在pom文件中加入依赖\n```\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.wherewego\u003c/groupId\u003e\n        \u003cartifactId\u003emy-rpc\u003c/artifactId\u003e\n        \u003cversion\u003e0.0.1-alpha\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n3.添加配置信息\n```\n#配置目标服务的地址\nwherewego.rpc.address=127.0.0.1:8088\n#配置服务提供者的端口号（如果当前的工程不是服务提供者，则可以不配置）\nwherewego.rpc.protocol.port=8088\n#通信协议\nwherewego.rpc.protocol.name=wqRpc\n#应用名称\nwherewego.rpc.application.name=wqRpc\n```\n4.服务提供者编写接口\n\n在启动类上加入注解，加入注解MyRPC才能启动\n```\n//包路径为com.wherewego.rpc.config.annotation\n@EnableMyRPC\n```\n\n测试代码，例：\n```\npublic interface ITest{\n    int add(int a,int b);\n}\n//使用myrpc提供的注解com.wherewego.rpc.config.annotation.MyRPCService\n@MyRPCService\npublic class TestImpl implements ITest{\n    @Override\n    public int add(int a,int b){\n        return a+b;\n    }\n}\n```\n5.消费者调用服务端接口\n\n在启动类上加入注解，加入注解MyRPC才能启动\n```\n//包路径为com.wherewego.rpc.config.annotation\n@EnableMyRPC\n```\n\n测试代码，例：\n```\n//使用myrpc提供的注解 在com.wherewego.rpc.config.annotation包下\n@MyRPCReference\nprivate ITest test;\npublic void test(){\n    int sum = test.add(1,2);\n    System.out.println(sum);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnt-dev%2Fmyrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvnt-dev%2Fmyrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnt-dev%2Fmyrpc/lists"}