• 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...
  • 上一文简单介绍了spring data jpa 和一个简单的实现 现在来详细解读下 Repository 接口是 Spring Data 的一个核心接口,它不提供任何方法,开发者需要在自己定义的接口中声明需要的方法 : public interf...
  • 什么是jpa JPA全称Java Persistence API.JPA通过JDK 5.0注解或XML描述对象-关系表的映射关系,并将运行期的实体对象持久化到数据库中 ==JPA(Java Persistence API)==是Sun官方提出的...