Giter VIP home page Giter VIP logo

kotlin-backend-tool-library's Introduction

kotlin-backend-tool-library

A kotlin backend development tool library

轻松的将kotlin加入现有的java项目

Spring Initializr默认的kotlin项目只能在kotlin代码中调用java。不能互相调用。 只需要将

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.0</version>
</parent>

替换成:

<parent>
    <groupId>com.github.jchanghong</groupId>
    <artifactId>kbtool-lib</artifactId>
    <version>2.7.0</version>
</parent>

就可以在已有的项目里面随意用kotlin或者用java。不影响现有java代码。

引入依赖

通过加入如下依赖,就可以把后端常用库全部引入, 比如guava,hutool,common系列,spring-mvc,validation,json常用库,http常用库等等

<dependency>
    <groupId>com.github.jchanghong</groupId>
    <artifactId>kbtool-lib</artifactId>
    <version>2.7.0</version>
</dependency>

并将工作中常用的有些工具类,抽象出来,比如时间你可以像下面这样用:

 val date = "2022-05-05 00:00:00".toDateJdk7OrNull()
    println(date.toStrOrNow())
    println(date.toLocalDateTime().toStrOrNow())
    println(date.toJsonStr())

kotlin-backend-tool-library's People

Contributors

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