• 什么是HashMap HashMap是用哈希表(直接一点可以说数组加单链表)+红黑树实现的map类 HashMap是一个用于存储Key-Value键值对的集合 HashMap数据结构 HashMap存储的是key-value的键值对,允许key...
  • 1配置好properties 2 打jar包 3 上传运行 nohup java -jar xxx.jar & nohup 常驻 不会因为你关闭命令界面而停止服务 &表示执行命令后要生成日志文件nohup.out 也可以指定日志文...
  • 1.加入pom支持 <!--springboot 参数校验--> <dependency> <groupId>org.hibernate</groupId> <artifactId>h...
  • 不使用事物 定义好的cat类和dao 在junit测试中代码 cat 的构造器 public Cat(Integer id, Integer catAge, String catName) { this.id = id; this.catAge ...
  • 加入依赖 <!--junit--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sprin...
  • logback是springboot 默认使用的日志 引入jar <!--logback 日志--> <dependency> <groupId>org.springframework.boot</...
  • spring boot使用thymeleaf 在pom.xml中引入thymeleaf 如何关闭thymeleaf缓存 编写访问模板文件controller 编写模板文件.html pom文件加入thymeleaf <dependenc...
  • Spring Boot 支持多种外部配置方式 这些方式优先级如下: 命令行参数 来自java:comp/env的JNDI属性 Java系统属性(System.getProperties()) 操作系统环境变量 RandomValueProper...
  • JDBCTemplate 在pom.xml加入jdbcTemplate的依赖; <dependency> <groupId>org.springframework.boot</groupId> <arti...