2022-02-08

概述

学习笔记

  • java语言,秒杀项目
  • 学习链接:https://www.bilibili.com/video/BV1kq4y1674Y?from=search&seid=12126299939658579390&spm_id_from=333.337.0.0

技术栈

  • 前端: Thymeleaf,Bootstra,Jqueryy
  • 后端: SpringBoot , MybatisPlus,Lombok
  • 中间件: RabbitMq,Redis

项目搭建

主要就是简单整合一下mybatisPlus ,能连接数据库就行

  • 依赖
    
        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        
        
            org.springframework.boot
            spring-boot-starter-web
        

        
            mysql
            mysql-connector-java
            5.1.30
            runtime
        
        
            org.projectlombok
            lombok
            true
        
        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
        
            com.baomidou
            mybatis-plus-boot-starter
            3.5.1
        
        
        
            com.alibaba
            druid-spring-boot-starter
            1.1.10
        
    
  • 配置
### port
server:
  port: 8080

spring:
## DB
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
    url: jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=utf-8
    username: root
    password: root
    druid:
      # 初始化大小,最小,最大
      initial-size: 5
      min-idle: 5
      max-active: 20
      # 配置获取连接等待超时的时间
      max-wait: 60000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位毫秒
      time-between-eviction-runs-millis: 60000
      # 配置一个连接在池中最小生存时间
      min-evictable-idle-time-millis: 300000
## thymeleaf 关闭缓存
  thymeleaf:
    cache: false

## mybatisPlus
mybatis-plus:
  mapper-locations: classpath:/mapper/*Mapper.xml
  type-aliases-package: com.example.miaosha.pojo

## 日志
logging:
  level:
    com.example.miaosha.mapper: debug

todo

  • 测试连接
  • md5 加密
  • 逆向工程

你可能感兴趣的:(2022-02-08)