GithubHelp home page GithubHelp logo

zhuqiandann / spring-parent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mingyang66/spring-parent

0.0 0.0 0.0 1.3 MB

自定义Springboot starter、自动化配置、条件配置、AOP、模式配置、幂等性组件、限流组件、返回值包装组件、redis组件、异常处理组件、基础工具包、Spring security、OAuth2、集成Redis、封装token端点、Spring学习笔记、RabbitMQ、Docker、Netty

Java 98.44% CSS 0.31% HTML 1.16% Lua 0.08%

spring-parent's Introduction

spring-parent

maven父pom和子pom的版本号批量修改

1 设置新的版本号
mvn versions:set -DnewVersion=2.1.1.RELEASE
2 撤销设置
mvn versions:revert
3 提交设置
mvn versions:commit
4.项目打包(同时处理项目所依赖的包)
mvn clean install -pl sgrain-spring-boot-starter -am

./mvnw clean install -pl sgrain-spring-boot-starter -am
参数 全程 说明
-pl --projects 选项后可跟随{groupId}:{artifactId}或者所选模块的相对路径(多个模块以逗号分隔)
-am --also-make 表示同时处理选定模块所依赖的模块
-amd --also-make-dependents 表示同时处理依赖选定模块的模块
-N --non- 表示不递归子模块
-rf --resume-frm 表示从指定模块开始继续处理

打tag标签

1.添加tag
git tag -a version1.0 -m 'first version'
2.提交tag
git push origin --tags

其它tag操作参考:tag操作指南


自动化配置组件AutoConfiguration

1.拦截控制器日志组件
  • 配置关闭组件
spring.sgrain.log-aop.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {LogAopAutoConfiguration.class})
  • 配置关闭组件
spring.autoconfigure.exclude=xxx
2.RestTemplate网络请求配置组件
  • 配置关闭组件
spring.sgrain.http-client.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {HttpClientAutoConfiguration.class})
  • 配置关闭组件
spring.autoconfigure.exclude=xxx
3.Redis配置组件
  • 配置关闭组件
spring.sgrain.redis.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {RedisAutoConfiguration.class})
4.控制器返回值包装组件
  • 配置关闭组件
spring.sgrain.return-value.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {ReturnValueAutoConfiguration.class})
  • 配置关闭组件
spring.autoconfigure.exclude=xxx
5.限流组件
  • 配置关闭组件
spring.sgrain.rate-limit.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {RateLimitAutoConfiguration.class})
  • 配置关闭组件
spring.autoconfigure.exclude=xxx
6.幂等性组件(防止接口重复提交)
  • 配置关闭组件
spring.sgrain.idempotent.enable=true
  • 注解关闭组件
@SpringBootApplication(exclude = {IdempotentAutoConfiguration.class})
  • 配置关闭组件
spring.autoconfigure.exclude=xxx
  • 支持两种验证方式
通过接口/token/generation接口获取token令牌,并且通过验证token的有效性来判断是否重复提交;
通过令牌和URL组合的方式作为主键创建分布式锁的模式,这种模式适合用户已经登录,存在用户token令牌的模式;

spring-parent's People

Contributors

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