<!--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. pytorch Containers的Module部分

    参考:https://pytorch.org/docs/stable/nn.html Containers Module CLASS torch.nn.Module 所有神经网络模块的基类 你定义的模 ...

  2. svn服务端搭建

    本文介绍的是SVN的服务器端的搭建. 一.SVN服务器安装 1.     首先来下载和搭建SVN服务器,下载地址如下: http://subversion.apache.org/packages.ht ...

  3. TS - 问题解决力 - 下篇

    本文是已读书籍的内容摘要,少部分有轻微改动,但不影响原文表达. <麦肯锡工作法 - 个人竞争力提升50%的7堂课> ISBN: 9787508644691 https://book.dou ...

  4. 【VS开发】如何判断客户端SOCKET已经断开连接?

    http://biancheng.dnbcw.info/linux/366100.html    最近在做一个服务器端程序,C/S结构.功能方面比较简单就是client端与server端建立连接,然后 ...

  5. WCF之Windows宿主(可安装成服务自动并启动)

    WCF之Windows宿主(可安装成服务自动并启动) 创建解决方案WCFServiceDemo 创建WCF服务库(类库或WCF服务库)WCFService  ,添加引用System.ServiceMo ...

  6. ubuntu18.04下安装gitlab

    1.安装并配置必要的依赖关系 sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates 接下来,安 ...

  7. Linux将.deb以绿色免安装的方式“安装”

    1.如果是xxx.deb文件,一般网上都是教你dkpg -i xxx.deb,但是这种方式类似windows里的安装,可能会在很多地方生成一些“垃圾”数据[比如不需要在dpkg安装应用信息文件里写入此 ...

  8. [转帖]JAVA虚拟机和安卓虚拟机的区别

    作者:天光链接:https://www.zhihu.com/question/20207106/answer/14654536来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出 ...

  9. 《Mysql - 在Mysql服务出现瓶颈时,有哪些“饮鸩止渴”提高性能的方法?》

    一:情景 - 业务高峰期,生产环境的 MySQL 压力太大,没法正常响应,需要短期内.临时性地提升一些性能. - 在业务高发时候,Mysql 服务压力过大,导致业务受损, 用户的开发负责人说,不管你用 ...

  10. python基础学习(十)

    21.文件操作 # r只读 w只写(原来文件会消失!!!,也可以创建新文件) a追 # 加 r+ 读写 story_file = open("Story.txt", "r ...