zoukankan      html  css  js  c++  java
  • springboot 常见的启动器

     <!--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

  • 相关阅读:
    【文字检测算法整理】
    【LDA】周志华
    【PCA】周志华
    【SVM】周志华
    4.1、顺序栈的实现(java实现)
    3.1、双向循环链表(java实现)
    5、链表队列(java实现)
    4、链栈的实现(java代码)
    3、循环链表(java实现)
    CommonsMultipartFile 转为 File 类型
  • 原文地址:https://www.cnblogs.com/houchen/p/12046769.html
Copyright © 2011-2022 走看看