spring_boot icon indicating copy to clipboard operation
spring_boot copied to clipboard

Spring Boot 使用总结 和 demo。 如果您觉得本代码对您有所帮助,请点击页面右上方"Star"

说明

更新说明

工程说明

core 存储常用的spring核心用法

  • com.hry.spring.configinject:@Value注入用法总结
  • com.hry.spring.spel.multiway:xml、注解和Programing 3种方式使用Spring EL

docker

  • 创建自己的docker的用法

grpc

  • com.hry.spring.grpc
    • simple: hello world
    • stream: 官方例子
    • util: 工具类

log

  • 演示logback+sl4j的用法

mvc

mybatis

  • mybatis的用法
  • 演示pagehlper在spring boot中的用法
  • 演示spring boot集成mybatis
  • 演示Model转化为dto

protobuf

  • protobuf的用法总结

rabbitmq

  • rabbitmq的用法总结

redis: redis的用法

  • com.hry.spring.redis
    • simple: 简单redis集成spring boot; redis执行lua脚本
    • distributedlock: 分布锁实现 http://192.168.188.6:8080/distributeLock
    • cache: redis做为缓存
    • timedtask: 通过redis处理定时任务 1. 简单定时任务 2. 失败重推

taskExecutionAndScheduling: 定时任务,异步任务

swagger

  • swagger用法demo
  • swagger访问地址:http://127.0.0.1:8080/swagger-ui.html

thymeleaf

  • com.hry.spring
    • ctl: 第一个demo: http://localhost:8080/simple
    • expressions: 标准表达式,加载外部属性文件,复杂对象(成员变量是对象,list,map),web对象
      • http://localhost:8080/expressions/simple
      • http://localhost:8080/expressions/complex?id=112
      • http://localhost:8080/expressions/url
      • http://localhost:8080/expressions/utility
    • programming:Simple conditionals: “if” and “unless”;Iteration;Switch statements
      • http://localhost:8080/programming/programming
    • template: 定义和引用模板: th:include 和 th:replace, th:remove 删除代码
      • http://localhost:8080/template/template
    • 代处理:
      • Setting Attribute Values:Appending and prepending; Fixed-value boolean attributes;