Git Product home page Git Product logo

sswork's Introduction

sswork

  • RestController统一返回值处理

使用@ResponseResult注解在类或者方法上,此方法返回值会被包装成Result对象。

  • Redis分布式锁

采用Jedis实现了单机版本的Redis分布式锁,Redisson实现了Redis-Cluster集群模式的分布式锁。未来可以加上注解实现AOP自动获取锁的方法。 参考 KLock的实现。

  • MySQL 单个实例 多数据库事务测试

经过测试,同个MySQL实例,多个数据库之间是同一个事务,无需指定多个数据源和事务管理器。

配置两个数据源DBConfigOne和DBConfigTwo,分别对应jdbc:mysql://118.25.210.217:13306/test和jdbc:mysql://118.25.210.217:13306/app
测试发现需要在SQL表名前指定库名,比如app.student、test.score,这样才能查询到数据
同时去掉DBConfigTwo配置的时候,也可以成功操作。

同时解决了Spring事务相关疑惑,详情见note - Spring里《Spring事务详解》

  • 下一步准备做使用MQ处理订单超时关闭的任务。

sswork's People

Contributors

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