<!--pringBoot提供了一个名为spring-boot-starter-parent的工程,

 里面已经对各种常用依赖(并非全部)的版本进行了管理

 我们的项目需要以这个项目为父工程,这样我们就不用操心依赖的版本问题了-->

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.RELEASE</version>
  </parent>

<!-- web启动器 -->

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>

<!--mybatis -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>

# mybatis 别名扫描

mybatis.type-aliases-package=com.heima.pojo
# mapper.xml文件位置,如果没有映射文件,请注释掉
mybatis.mapper-locations=classpath:mappers/*.xml

<!-- 通用mapper -->
<dependency>
  <groupId>tk.mybatis</groupId>
  <artifactId>mapper-spring-boot-starter</artifactId>
  <version>2.0.2</version>
</dependency> @Mapper
public interface UserMapper extends tk.mybatis.mapper.common.Mapper<User>{
}
<!-- themeleaf 模板-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

#Thymeleaf会在第一次对模板解析之后进行缓存,极大的提高了并发处理能力

# 开发阶段关闭thymeleaf的模板缓存
spring.thymeleaf.cache=false

springboot 常见的启动器的更多相关文章

  1. 【SpringBoot】01.创建Springboot项目及启动器

    创建Springboot项目及启动器 1.创建一个简单maven项目 SpringBoot2.0以下需要使用JDK1.7 ,2.0以上使用JDK1.8 如果需要修改JDK的版本需要打开pom文件: & ...

  2. SpringBoot 定制 starter 启动器

    个人博客网:https://wushaopei.github.io/    (你想要这里多有) 在实际项目开发中,我们常常会用到各种各样的 starter,这些starter 有的是有 springb ...

  3. SpringBoot常见注解

    0.前言 这篇文章介绍的 Spring/SpringBoot 常用注解基本已经涵盖你工作中遇到的大部分常用的场景.对于每一个注解我都说了具体用法,掌握搞懂,使用 SpringBoot 来开发项目基本没 ...

  4. 【springboot】自定义启动器

    本文只对springboot自定义启动器的具体实现进行描述,不涉及springboot自动装配原理的介绍. 对springboot自动配置原理感兴趣的请移步 狂神说SpringBoot02:运行原理初 ...

  5. springboot常见应用属性

    # ===================================================================# COMMON SPRING BOOT PROPERTIES ...

  6. springboot常见写法

    访问html文件 对于aa.html页面,采用跳转到方式:放在templates目录下时,要加一个thymeleaf依赖,并在controller跳转. 不用跳转到方式: 将依赖去掉,将control ...

  7. 170710、springboot编程之启动器Starter详解

    此文系参考网络大牛的,如有侵权,请见谅! Spring Boot应用启动器基本的一共有N(现知道的是44)种:具体如下: 1)spring-boot-starter 这是Spring Boot的核心启 ...

  8. springboot常见注解 2020-01-19

    1,@SpringBootApplication 是springboot的核心注解,用在启动类上,是由 @Configuration 加载spring,配置spring并启动spring容器; 启动容 ...

  9. SpringBoot常见的异常问题

    1. org.mybatis.logging.LoggerFactory Springboot启动报错 Caused by: java.lang.ClassNotFoundException: org ...

随机推荐

  1. Python3基础 运算 加减乘除、取余数

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  2. 深入学习c++--lambda函数

    1. 简单使用 #include <iostream> #include <functional> using namespace std; struct Print { vo ...

  3. Qt编写气体安全管理系统23-类型设置

    一.前言 类型设置这个功能模块大大拓展了整个系统的灵活性,将整个系统中所有用到的控制器型号.探测器数量.探测器型号.气体种类.气体符号都存储到数据库表中,用户在类型设置中可以自由添加删除和修改,这样后 ...

  4. k8s记录-ntpd时间同步配置(五)

    1)服务端配置 在192.168.0.1 root用户下操作 yum install -y ntp ntpdate 修改etc/ntp.conf 注释所有的server和restrict 加入: se ...

  5. 避免复制引用程序集的XML文件

    VS在编译时,默认会复制所有引用程序集对应的XML文件到输出目录. 在项目中设置AllowedReferenceRelatedFileExtensions可以避免复制操作. <PropertyG ...

  6. Mstar方案软件运行基本原理

    1. MApp_Main.c里有个while(1)循环: 2. 通过 while(1)循环MApp_MultiTasks 里面的 MApp_ProcessUserInput 可以 得到 当前的 u8K ...

  7. cmake vs qmake

    qmake 是为 Qt 量身打造的,使用起来非常方便 cmake 使用上不如qmake简单直接,但复杂换来的是强大的功能 内置的 out-of source 构建.(目前QtCreator为qmake ...

  8. Python 绘图库Matplotlib入门教程

    0 简单介绍 Matplotlib是一个Python语言的2D绘图库,它支持各种平台,并且功能强大,能够轻易绘制出各种专业的图像. 1 安装 pip install matplotlib 2 入门代码 ...

  9. CentOS下使用yum安装Apache极为方便,只需要在终端键入以下命令即可

    CentOS下使用yum安装Apache极为方便,只需要在终端键入以下命令即可 1.安装Apache yum install httpd 2.设置服务器开机自动启动Apache systemctl e ...

  10. Python15之字符串的格式语句与操作符

    一.字符串的format()函数 字符串1.format(赋值)                         字符串中必须表明需要格式化的位置 format()函数使用时,花括号中的值表明字符串中 ...