Attendance项目搭建

maven依赖

<dependencies><!--阿里的json转换jar包--><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.60</version></dependency><!--mubatis-plus--><!--mubatis-plus是自己开发的,并非官方的--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.5.1</version></dependency><!--security:安全相关的--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId></dependency><!--非官方: mybatis-spring-boot-starter--><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.2.2</version></dependency><!--Druid--><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.1.21</version></dependency><!--Druid会使用log4j的日志记录,使用导入依赖--><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency><!--JDBC--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency><!--MySQL--><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><scope>runtime</scope></dependency><!--Web--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--springboot测试--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope><exclusions><exclusion><groupId>org.junit.vintage</groupId><artifactId>junit-vintage-engine</artifactId></exclusion></exclusions></dependency></dependencies>

mybatis-plus(MP)和mybatis的依赖都导入了的 MP是非入侵,使用使用啥都行

mybatis在这里面创建xml文件

MP有示例

MP有代码生成器(逆向工程):暂时没用到

我在yaml中配置了连接等需求,springboot推荐使用yaml,在idea插件中搜索Spring Boot Assistant

spring:datasource:username: rootpassword: 123456#    假如时区报错了加  &serverTimezone=UTCurl: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=truedriver-class-name: com.mysql.cj.jdbc.Driver#    配置druid数据源type: com.alibaba.druid.pool.DruidDataSource#    配置监控统计拦截的filters,stat:监控统计、log4j:日志记录、wall:防御sql注入#    如果允许时报错 java.lang.ClassNotFoundExcption :org.apache.log4j.Priority#    则导入 log4j 依赖即可,Maven 地址: https://mvnrepository.com/artifact/log4j/log4jfilters: stat,wall,log4jmaxPoolPreparedStatementPerConnectionSize: 20useGlobalDataSourceStat: trueconnectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500# 时间日期格式化 spring默认提交格式 yyyy/MM/ddmvc:format:date: yyyy-MM-dd HH:mm:ss# 整合mybatis
mybatis:type-aliases-package: com.attendance.pojomapper-locations:- classpath:mybatis/mapper/*.xml#    配置日志
mybatis-plus:configuration:log-impl: org.apache.ibatis.logging.stdout.StdOutImpl# 配置逻辑删除global-config:db-config:logic-delete-value: 1  # 1 为逻辑删除后的字段logic-not-delete-value: 0  # 0 为没有逻辑删除的字段logic-delete-field: deleted  #对应实体类的字段 写了这个在实体类中就不需要写注解了

druid配置好了换了数据库连接就可以直接用


这些都可以不用管

Json使用的是阿里的fastjson,简单易上手,一搜就会

API接口测试没有用Swagger,需要的话可以试试Postman或者APIfox或者APIpost

我推荐APIfox,因为中文

不推荐使用Lombok插件来配置POJO类,入侵性太强,版本跟jdk版本冲突,如果升级或报错,而且自己写方法,运行效率更高

Attendance相关推荐

  1. [Swift]LeetCode551. 学生出勤纪录 I | Student Attendance Record I

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ ➤微信公众号:山青咏芝(shanqingyongzhi) ➤博客园地址:山青咏芝(https://www.cnblog ...

  2. leetcode-551-Student Attendance Record I(判断是否出现连续几个相同字符)

    题目描述: You are given a string representing an attendance record for a student. The record only contai ...

  3. 551. Student Attendance Record I 从字符串判断学生考勤

    [抄题]: You are given a string representing an attendance record for a student. The record only contai ...

  4. LeetCode 551. Student Attendance Record I

    题目: You are given a string representing an attendance record for a student. The record only contains ...

  5. C#LeetCode刷题之#551-学生出勤纪录 I​​​​​​​(Student Attendance Record I)

    问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/3953 访问. 给定一个字符串来代表一个学生的出勤纪录,这个纪录仅 ...

  6. 签到考勤java课设_用Java设计一个考勤模拟程序Attendance

    用Java设计一个考勤模拟程序Attendance,实现如下功能选择界面: 1--上班签到 2--下班签出 3--考勤信息查阅 4--退出 考勤程序运行后,提示用户输入上述功能选择,并验证用户输入的用 ...

  7. Parameter 'attendance' not found. Available parameters are [param1, attendance, sid, param2]解决方法

    记录一下今天做项目出现的问题以及解决方案. 一.项目的部分代码 pojo层 public class Attendance {private Integer id;private Staff staf ...

  8. LeetCode——552. 学生出勤记录 II(Student Attendance Record II)[困难]——分析及代码(Java)

    LeetCode--552. 学生出勤记录 II[Student Attendance Record II][困难]--分析及代码[Java] 一.题目 二.分析及代码 1. 动态规划 (1)思路 ( ...

  9. leetCode题解 Student Attendance Record I

    1.题目描述 You are given a string representing an attendance record for a student. The record only conta ...

最新文章

  1. 动软代码生成器教程——懒人有福了
  2. 论文推荐 | 目标检测中不平衡问题算法综述
  3. .net常用技巧及调优
  4. Vue之通过连接数据库的接口获取列表实现添加删除功能
  5. python2.7装饰器使用_python 函数 装饰器的使用方法
  6. vue项目(webpack+mintui),使用hbuilder打包app - 小小人儿大大梦想 - 博客园
  7. python 函数 全局变量_python3函数内全局变量使用global
  8. 信息学奥赛一本通(1330:【例8.3】最少步数)
  9. oracle form lov 查询慢
  10. 一些Iphone sqlite 的包装类
  11. 云计算决策指南:解析医疗的7大解决方案
  12. 计算机科学与技术导论报告
  13. Unity3D 游戏摄像机的环绕与拉近
  14. python中and的用法
  15. 美团网官网最新底部导航页面制作及CSS样式设计
  16. 10段世界最美的英语美文
  17. 单例模式《单例模式概念、什么时候能用到单例模式、单例模式的好处》
  18. 细胞膜杂化脂质体载紫杉醇/红细胞膜包被雷公藤甲素-红素仿生共载脂质体的研究制备
  19. 1、暴力破解与实用性原则
  20. 如何获取PDF中的二维码信息

热门文章

  1. 2022年ISC第十届互联网安全大会——深度伪造对抗技术进展与挑战学习笔记
  2. 谈谈未来科技发展趋势—读KK《必然》
  3. 初学者编写python用什么软件
  4. 细数颈椎病的7大危害,可致瘫痪中风高血压
  5. 基于HttpURLConnection 网络请求工具类的封装
  6. python中如何插入C语言运行?
  7. H.264 入门篇 - 05 (帧内预测)
  8. 遇到u盘中删除的文件怎样才能恢复呢?
  9. Eclipse的switch workspace 选项中删除多余的workspace
  10. 修改植物大战僵尸游戏存档,二进制绘制字符或图形