<!--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. redis最大连接数

    Well, it's a bit late for this post, but since I just spent a lot of time(the whole night) to config ...

  2. 如何让winrar5压缩的文件能用低版本winrar打开

    https://jingyan.baidu.com/article/39810a2348ab24b636fda681.html 在压缩文件格式选项处点选[RAR4]选项,即之前版本的winrar支持的 ...

  3. LeetCode_342. Power of Four

    342. Power of Four Easy Given an integer (signed 32 bits), write a function to check whether it is a ...

  4. centos上为新创建的用户(git)指定根目录并生成公钥和私钥

    1.修改用户的根目录 vim /etc/passed 2.su git 3.ssh-keygen -t rsa ssh-keygen -t rsa 4.如图所示,如果要实现无密码访问git仓库,把公钥 ...

  5. Top 10 Machine Learning Algorithms For Beginners

    Linear Regression Logistic regression KNN Classification Support Vector Machine (SVM) Decision Trees ...

  6. antd一些问题

    1.去掉button光晕 用ant design中的Button的时候,每次点击都会在视图button上添加一个属性ant-click-animating-without-extra-node这个属性 ...

  7. axios ajax框架 请求配置

    请求参数 { // `url` is the server URL that will be used for the request url: '/user', // `method` is the ...

  8. golang中sync.RWMutex和sync.Mutex区别

    golang中sync包实现了两种锁Mutex (互斥锁)和RWMutex(读写锁),其中RWMutex是基于Mutex实现的,只读锁的实现使用类似引用计数器的功能. type Mutex     f ...

  9. 修正线性单元(Rectified linear unit,ReLU)

    修正线性单元(Rectified linear unit,ReLU) Rectified linear unit 在神经网络中,常用到的激活函数有sigmoid函数f(x)=11+exp(−x).双曲 ...

  10. 软件素材---linux C语言:拼接字符串函数 strcat的用例(与char数组联合使用挺好)

    [头文件]#include <string.h> [原型] 1 char *strcat(char *dest, const char *src); [参数]: dest 为目标字符串指针 ...