栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

SpringBoot入门学习(二)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

SpringBoot入门学习(二)

记录学习,不进行正文展示

目录

1、application.yml和Application的快速创建

2、application.yml(推荐)

3、pom.xml

4、断言(多用于测试)

1、application.yml和Application的快速创建

安装插件

2、application.yml(推荐)
spring:
  datasource:
    driver-class-name: org.h2.Driver
    schema: classpath:db/schema-h2.sql
    data: classpath:db/data-h2.sql
    url: jdbc:h2:mem:test
    username: root
    password: 123
    logging:
      level:
      com.qinluyu: debug

3、pom.xml

    
        1.8
    
    
    
        spring-boot-starter-parent
        org.springframework.boot
        2.0.1.RELEASE
    
    
        
    
        org.springframework.boot
        spring-boot-starter-web
    
        
        
            org.springframework.boot
            spring-boot-starter-test
        
        
        
            mysql
            mysql-connector-java
            5.1.45
        
        
        
            tk.mybatis
            mapper-spring-boot-starter
            2.0.0
        
        
        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        
        
        
            com.github.pagehelper
            pagehelper-spring-boot-starter
            1.2.3
        
    

4、断言(多用于测试)
Assert.assertEquals(26,list.size());

不适用前

使用后

5、lombok

import lombok.Data;

@Data
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/851076.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号