Coder Social home page Coder Social logo

springbootutil's Introduction

SpringBoot Util

介于代码的复用性,作者突发奇想,想搞点工具写着,仅供参考。另外,所有代码都是作者在本地跑通了以后才上传的,如果读者跑不通,大概率是环境问题,可以联系作者。

MybatisPlusDemo

  • MyBatisPlus工具
  • 主要内容
    • mybatis-plus的整合
      • application.yaml对mysql和mybatis-plus的配置
      • mapper接口(继承BaseMapper)
      • 拦截器配置类(分页才会生效)
    • Transactional注解
      • 原子性

KafkaDemo

  • Kafka工具
  • 主要内容
    • 环境搭建
      • kafka依赖zookeeper,先启动zookeeper:.\zkServer
      • 再启动kafka:.\bin\windows\kafka-server-start.bat .\config\server.properties
    • kafka的整合
      • 配置application.yml
      • producer
        • 同步producer
        • 异步producer
      • consumer
      • 为了监听异步producer,使用ProducerListener

GlobalExceptionDemo

  • 全局异常处理通用返回结果工具
  • 主要内容
    • 全局异常处理
      • @ControllerAdvice
      • @ExceptionHandler
      • @ResponseBody
    • 通用返回结果
      • enum ErrCode
      • ResultCode implements ErrCode
      • CommonResult 自定义通用返回结果
      • 自定义异常类 extends RuntimeException

ElasticSearchDemo

  • es工具
  • 主要内容
    • single search
    • nested search
  • script
    • path: ElasticSearchDemo/script.txt

springbootutil's People

Contributors

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