{"id":37019782,"url":"https://github.com/jchanghong/kotlin-backend-tool-library","last_synced_at":"2026-01-14T02:12:41.082Z","repository":{"id":57720406,"uuid":"494378439","full_name":"jchanghong/kotlin-backend-tool-library","owner":"jchanghong","description":"A kotlin backend development tool library，mainly includes common kotlin extensions for daily projects。轻松将kotlin加入现有java后端项目，自己日常工具类","archived":false,"fork":false,"pushed_at":"2022-06-16T06:33:52.000Z","size":2122,"stargazers_count":27,"open_issues_count":0,"forks_count":9,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-06T20:47:43.509Z","etag":null,"topics":["helper","java","json","kotlin","kotlin-extensions","spring","tool","util"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jchanghong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2022-05-20T08:13:33.000Z","updated_at":"2025-01-16T10:23:42.000Z","dependencies_parsed_at":"2022-09-02T11:01:57.775Z","dependency_job_id":null,"html_url":"https://github.com/jchanghong/kotlin-backend-tool-library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jchanghong/kotlin-backend-tool-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchanghong%2Fkotlin-backend-tool-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchanghong%2Fkotlin-backend-tool-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchanghong%2Fkotlin-backend-tool-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchanghong%2Fkotlin-backend-tool-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jchanghong","download_url":"https://codeload.github.com/jchanghong/kotlin-backend-tool-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchanghong%2Fkotlin-backend-tool-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["helper","java","json","kotlin","kotlin-extensions","spring","tool","util"],"created_at":"2026-01-14T02:12:40.408Z","updated_at":"2026-01-14T02:12:41.070Z","avatar_url":"https://github.com/jchanghong.png","language":"Kotlin","funding_links":[],"categories":["工具库"],"sub_categories":["语音合成"],"readme":"# kotlin-backend-tool-library\nA kotlin backend development tool library,mainly includes common kotlin extensions for daily projects\n# Easily add kotlin to existing Java projects\n# 轻松将kotlin加入现有的java项目\n### kotlin是java生态中最好用的库！！！\nSpring Initializr默认生成的kotlin项目只能在kotlin代码中调用java。不能互相调用。\n由于kotlin和java的良好互操作性，可以在任何项目中加入kotlin代码，不影响现有的java代码。\n\n# 如何使用？\n## 1.引入maven parent\n配置kotlin所有插件，还包括格式化插件，findBug插件等常用插件只需要将\n```xml\n\u003cparent\u003e\n    \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-starter-parent\u003c/artifactId\u003e\n    \u003cversion\u003e2.7.0\u003c/version\u003e\n\u003c/parent\u003e\n```\n替换成：\n```xml\n\u003cparent\u003e\n    \u003cgroupId\u003ecom.github.jchanghong\u003c/groupId\u003e\n    \u003cartifactId\u003ekbtool-parent\u003c/artifactId\u003e\n    \u003cversion\u003e2.7.0\u003c/version\u003e\n\u003c/parent\u003e\n```\n\n## 2.加入kbtool-lib依赖(如果只是想增加kotlin插件配置，不需要引入)\n通过加入如下依赖,就可以把后端常用库全部引入，\n比如guava，hutool，common系列，spring-mvc,validation,json常用库，http，retry常用库等等\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.jchanghong\u003c/groupId\u003e\n    \u003cartifactId\u003ekbtool-lib\u003c/artifactId\u003e\n    \u003cversion\u003e2.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n并将工作中常用的工具类，独立出来，方便多项目引入，比如下面这些代码（会持续更新）：\n```kotlin\n val date = \"2022-05-05 00:00:00\".toDateJdk7OrNull()\n    println(date.toStrOrNow())\n    println(date.toLocalDateTime().toStrOrNow())\n    println(date.toJsonStr())\n    println(\"hello\".toUnderlineCase())\n    println(\"hello\".upperFirst())\n    println(\"hello\".toCamelCase())\n    RetryHelper.submitByRetry4Times(aCallable)\n    RetryHelper.submitByRetryNTimes(aCallable)\n    HttpHelper.postJsonStringSyn(\"https://\",\"{}\")\n    val abean=\"{}\".jsonToObject\u003cABean\u003e()\n```\nkbtool-parent默认加入\n---\n1. kotlin-reflect\n2. kotlin-stdlib-jdk8\n3. lombok\n4. spring-boot-starter-test\n---\nkbtool-lib默认加入以下依赖\n---\n1. guava-retrying 重试\n1. hutool-all 工具库\n1. okhttp 工具库\n1. kotlinx-coroutines\n1. guava 工具库\n1. cglib\n1. json-path\n1. commons-fileupload\n1. commons-net\n1. commons-io\n1. commons-text\n1. springfox swagger接口\n1. fastjson\n1. spring-boot-starter-json\n1. spring-boot-starter-validation\n1. spring-boot-starter-web\n1. jsoup\n1. ojdbc8\n1. postgresql 可以去掉换mysql等\n1. hibernate-types-52 jpa插件库\n1. jackson-datatype-* json额外的类型库\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchanghong%2Fkotlin-backend-tool-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjchanghong%2Fkotlin-backend-tool-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchanghong%2Fkotlin-backend-tool-library/lists"}